[REVIEW 3-5] fdo#47644 performance regression on largish .doc

Caolán McNamara caolanm at redhat.com
Thu May 10 13:56:24 PDT 2012


On Thu, 2012-05-10 at 17:37 +0100, Michael Meeks wrote:
> 	Surely that should read:
> 
> 		nBgn = m_aPageCache[nRel];
> 
> 	or did I go a bit crazy ? [ I'm trying to turn the above into that
> mentally and giving up ;-].

how about a 4 element chain of 10 11 12 13

with a scenario of nBgn = 11, nRel = 2, desired result is 13

so nBgn of 11 gives a nBgnDistance of 1
so desired nIndex is 3, nBgnDistance (1) + nRel (2);

so nBgn = m_aPagesCache[nIndex]; and set nRel to 0 to indicate
successfully stepped to desired page

with an alternative scenario of nBgn = 11, nRel = 8
get nBgnDistance of 1 again, so desired nIndex of 9, clip it as its out
of scale to the max of 3, reduce nRel by how valid steps we took (2) to
give 6 un-achievable steps.... oops my out-of-bounds code is all
wrong :-) fixed with 75e7643e22bcf674739ca890bfc06f80e872624b

> 	StgFATStrm::SetPage(); should prolly just update that vector as well as
> doing the nasty fat walk so:
> 
> 	m_aPageCache[nBlocks] = nNewPage;

would have to check around the insertion point if the sort order is
still valid afterwards I guess, throwing away everything is my current
cowardly conservative approach on any modifications

C.



More information about the LibreOffice mailing list