If you have ever felt that the free translation tool OmegaT was too slow, you might find these tips helpful.
The speed of navigation within and between segments decreases proportionally to the size of the currently opened file. Choose any of the workarounds below:
- Break a large file into smaller ones. I cannot write a better explanation of this than Kos Ivantsov did.
- Create a file without repetitions and 100% matches by using a script called write_untranslated2file.groovy (also written by Kos), which will likely be smaller and easier to handle for OmegaT as a result.
After you finish translating the intermediate smaller file that you created, you need to put the original files into the source subfolder of your project, open the project, verify that all translations were inserted correctly into the original files, and create the target documents. Unfortunately, because the names of the intermediate and original files are different, you will lose all alternative translations of non-unique segments, since those translations are associated with file names.
As one of my colleagues, Vladimir, realized recently, disabling whitespace characters improves the speed of moving within and between segments in the Editor. Although displaying whitespace characters is very useful, the inconvenience of working without this feature is worth the resulting speed improvement. You can disable whitespace characters under View > Mark Whitespace.
Disable Regular Expression for fragments that should be removed from the translation
Available under Options > Tag Validation, this field enables you to build a list of words that OmegaT should flag as not allowed in translation. Although this is a very useful feature (as I described in the post about configuring a list of common errors in OmegaT), it does slow down OmegaT’s search within translation memories. I miss this function after having to disable it, but the speed improvement in the Fuzzy Matches pane is way more important. Before I did this, working on projects with many matches was a pain because of the slow Fuzzy Matches pane.
Allocate more RAM to OmegaT
If you translate projects with large files and many large TMs, you may try increasing the amount of RAM available to OmegaT. Under a 32-bit operating system, you cannot allocate more than approximately 1,500 MB, though. For a 64-bit one, the sky is virtually the limit. If you are running OmegaT under Windows, here is what you have to do:
- Open the file c:Program Files (x86)OmegaTOmegaT.l4J.ini with any text editor.
- Locate the “–Xmx_number_M“ option.
- Increase it appropriately. Example: “–Xmx1500M” option for a 32-bit OS or “–Xmx4096M” for a 64-bit one.
- Save and close the file.
SDLXLIFF: Remove header tag if a project takes too long to load or a file contains weird text at the beginning
If you translate segmented SDLXLIFF files directly in OmegaT using the native filter (called simply “XLIFF”), you will soon notice that larger files cause problems when loading. They can take too long to load and/or contain untranslatable information. This is caused by a huge header tag in those SDLXLIFF files. To improve performance, you need to temporarily remove this tag. After you produce the translated SDLXLIFFs, you restore it. Here is how you do it:
- Make a copy of a SDLXLIFF file and open it with a text editor.
- Find the opening tag <header> and the closing tag </header>.
- Highlight everything between them, including the opening and closing tags themselves.
- Delete everything you highlighted.
- Open the resulting file in OmegaT, translate it, and create the translated SDLXLIFF file.
- Open this translated file.
- Find the opening tag <body>.
- Highlight and copy everything from this tag, this tag included, down to the bottom of the document.
- Open the original file.
- Again, find the opening tag <body> and highlight everything down to the bottom of the document.
- Insert here what you copied from the translated file.
- As a result, you will get the fully translated original file with the header tag intact.
For more information about tackling problems in this translation program, check out the article about most common errors in OmegaT.
Please comment, if anything in this article is unclear or you have something to add.