יום רביעי, ספטמבר 30, 2009

OO.o misterious freeze isn't a mistery anymore

I wonder how many more languages (beside Hebrew) are affected by this...

Ilan Shavit (Hebrew) posted about an OpenOffice.org "freeze" and a workaround:
  • Whenever someone started writing something in Hebrew in an OO.o session there was a noticeable freeze of the application for several seconds. After this first freeze everything would be back to normal and you could open/edit/close Hebrew documents without further freezes.
  • Ilan pointed to a thread in some local (Hebrew) forum containing somewhere a link to improved Hebrew myspell dictionary. (prepared by the good guys from Tk Open Systems that work on improving Hebrew support in OO.o on behalf of the Israeli government).
It turns out that what they did is convert the dictionary from ISO-8859-8 encoding to UTF-8.
A quick test on one of my computers:
  1. Run oowriter, started writing the word שלום (Peace in Hebrew). It freezes after the second letter.
  2. Close oowriter and repeat step 1 three times (to eliminate caching effects).
  3. Measured the freeze -- it lasted for about 10 seconds.
  4. Replace he_IL.aff and he_IL.dic with the "fixed" ones.
  5. Repeating step 1 now freeze for less than 1 second. WOW!
Questions:
  • What is the exact conversion process? The .aff file is textual, so it's easy with iconv(1), however I don't know the myspell toolchain (maybe translate-toolkit has the correct tools, didn't check).
  • Do other languages have similar problems? Maybe only CTL languages affected?
  • How hard it would be for package maintainers to fix this until upstream rolls it out?