Hi!
Sorry for my English.
oocalc: list of fonts in dialogue "Format Cells" (menu "Format" -> "cells ..." tab "Font") opens very slowly (10 times) after installing LanguageTool.
Version:
LanguageTool 1.1, 1.2
OpenOffice.org 3.2.1 (OOO320m19 (Build: 9505), ooo-build 3.2.1.6)
Gentoo Linux amd64/10.0
I can confirm this with LT 1.1 + OOo 3.3.0rc8/LO 3.3.0rc2 + Ubuntu 10.o4 + JRE6u20
To reproduce
1. Close OOo/LO completely
2. Open new Calc document
3. Right click on the cell A1 and go to the "Format Cells..." menu.
4. In case you use LibO, click the "Font" tab.
Result: a few seconds of 100% CPU load and freeze.
Seems to be similar to https://bugs.freedesktop.org/show_bug.cgi?id=32279
OpenOffice.org bug 116409
http://www.openoffice.org/issues/show_bug.cgi?id=116409
I cannot reproduce it with 3.3 stable (Windows XP, Java 6u20). Could you check if it is still there?
I have no OpenOffice.
The problem is still there:
Gentoo, LibreOffice 3.3.1 (OOO330m19), sun-jdk-1.6.0.24
Yes. This problem is stil there: OpenOffice 3.3.0 Windows
Reproduce as is in 1 comment If cursor is in A1 cell.
Related bug reports at LibreOffice / OpenOffice.org:
http://bugs.freedesktop.org/show_bug.cgi?id=35270
http://bugs.freedesktop.org/show_bug.cgi?id=30762
http://openoffice.org/bugzilla/show_bug.cgi?id=116409
http://openoffice.org/bugzilla/show_bug.cgi?id=32279
Some analysis: on my machine, OOo (tested with 3.2.0) hangs 7 seconds. 1 second is because we initialize every language on startup. That will be fixed in tomorrow's LT snaphot. The other 6 seconds is somewhere in OOo, where it calls getLocales() more than 200 times. However, we answer that call in less than 1ms. If we don't iterate and return all the locales we support but only one, the hang is 3.5 seconds instead of 7 seconds.
I just checked that the problem is not caused by the pure size of LT: if I remove language resources that doesn't help.
I have finally come up with a more detailed analysis: on each startup, the slow method SvxLinguConfigUpdate::UpdateAll() is called. A comment in the code suggests that this isn't needed anymore. Can we change the code like the comment suggests in unolingu.cxx, line 395?
Here's in detail what happens:
doclay.cxx calls (*pLayIter)->GetCurrShell()->LayoutIdle();
layact.cxx calls ((SwTxtFrm*)pCnt)->_AutoSpell( pCntntNode, *pSh->GetViewOptions(), nTxtPos );
txtedt.cxx calls bSpell = xSpell.is() ? xSpell->hasLanguage( eActLang ) : sal_False;
unolingu.cxx calls SpellDummy_Impl::GetSpell_Impl()
finally, SpellDummy_Impl::GetSpell_Impl() calls this:
if (SvxLinguConfigUpdate::IsNeedUpdateAll())
SvxLinguConfigUpdate::UpdateAll();
IsNeedUpdateAll() will return true, because aLinguOpt.nDataFilesChangedCheckValue is -1 because SvxLinguConfigUpdate::UpdateAll() will set it to -1, with a comment that this is only needed to <= OOo 3.0
("for the time being (developer builds until OOo 3.0)..."). Thus after each startup, SvxLinguConfigUpdate::UpdateAll() gets called which takes a few seconds and blocks the machine.
Another question is why SvxLinguConfigUpdate::UpdateAll() is so slow and blocks the machine. I haven't checked that out yet.
See https://bugs.freedesktop.org/show_bug.cgi?id=35270 for debugging updates
This has been fixed in LibreOffice 3.5.4 and it looks it's going to be fixed in Apache OpenOffice 3.4.1.
Nice work! Nice tool! Thank you very much!
I can confirm that on the deb builds for AOO 3.4.1 LT 1.7 works really fast, both on start-up and common usage.
Closing as Won't Fix as we will not fix it locally in LT, but we fixed it in other places ;)