Comment 19 for bug 998778

Revision history for this message
In , Daniel Naber (misc2006) wrote :

I have finally come up with a 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? Namely using

aAny <<= nCurrentDataFilesChangedCheckValue;

instead of

aAny <<= (sal_Int32) -1; // keep the value set to 'need to check'

I have tested that this fixes the issue that this bug report is about.

Here's in detail what happens on startup:

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 for <= 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 questions is why SvxLinguConfigUpdate::UpdateAll() is so slow and blocks. I haven't checked that out, as the change above fixes the problem. I have increased the 'version' property of this bug report because it also affects the latest version.