Re: Win32 performance results


Subject: Re: Win32 performance results
From: Mike Nordell (tamlin@algonet.se)
Date: Wed Mar 07 2001 - 19:39:07 CST


WJCarpenter wrote:
> One of the two calls mentioned, getPrefs() is just an accessor method
> for a private member variable. So, it could be eliminated if someone
> cared (I was just following a pattern),

A good pattern IMO. I might also add that even that they were called
millions of times for a small document scrolling 1100 lines back and forth,
they added very little to the total CPU usage (relatively speaking of
course).

But to yet again gain some insight, I took AbiWord for another test-drive
using the trusty ol' profiler. I'm using a debug-build why some figures may
be a bit off.

By simply loading the document AbiSourceCodeGuidelines.abw, setlocale was
called 5434 times which was quite noticable at about one full second of
P2-400 CPU time. It's called from UT_convertDimensionless which calls it
twice, once to set it, then call atof, and the revert to the previous
locale. This one is probably a good place to affect document loading times
since only 2717 calls to it chewed 1 second CPU, while e.g. 87000 strcmp
used 40ms.

92% of all calls to it was from UT_convertToInches which in turns was called
almost the same number of times from GR_Graphics::convertDimension and
UT_convertToLayoutUnits. GR_Graphics::convertDimension was mostly called
from fl_BlockLayout::_lookupProperties. And now for a pattern.
fl_BlockLayout::_lookupProperties was called 67 times each from three
fl_BlockLayout functions: format, redrawUpdate and the c'tor. Since only 201
calls to this _lookupProperties accounted for over 1 second of CPU... Well,
you get my point.

But this only mentioned loading a rather simple document. Inserting just one
single char at the beginning of the document displays a different story, but
I'll save that one for a rainy day. :-)

/Mike



This archive was generated by hypermail 2b25 : Wed Mar 07 2001 - 19:39:10 CST