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.
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.
I have finally come up with a detailed analysis: on each startup, the slow method SvxLinguConfigU pdate:: 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 <<= nCurrentDataFil esChangedCheckV alue;
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( ); )pCnt)- >_AutoSpell( pCntntNode, *pSh->GetViewOp tions() , nTxtPos ); >hasLanguage( eActLang ) : sal_False; Impl::GetSpell_ Impl() Impl::GetSpell_ Impl() calls this:
layact.cxx calls ((SwTxtFrm*
txtedt.cxx calls bSpell = xSpell.is() ? xSpell-
unolingu.cxx calls SpellDummy_
finally, SpellDummy_
if (SvxLinguConfig Update: :IsNeedUpdateAl l())
SvxLinguConfig Update: :UpdateAll( );
IsNeedUpdateAll() will return true, because aLinguOpt. nDataFilesChang edCheckValue is -1 because SvxLinguConfigU pdate:: UpdateAll( ) will set it to -1, with a comment that this is only needed for <= OOo 3.0 pdate:: UpdateAll( ) gets called which takes a few seconds and blocks the machine.
("for the time being (developer builds until OOo 3.0)..."). Thus after each startup, SvxLinguConfigU
Another questions is why SvxLinguConfigU pdate:: 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.