Re: General performance [was: drawing performance]


Subject: Re: General performance [was: drawing performance]
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Dec 18 2000 - 06:50:28 CST


On Mon, 18 Dec 2000, Aaron Lehmann wrote:

> On Mon, Dec 18, 2000 at 12:43:51AM -0800, Aaron Lehmann wrote:
> > 19.05 0.04 0.04 238909 0.17 0.17 UT_stricmp
> > // Yow! 20%?? This function is a hog!
>
> Changing the UT_stricmp to a simple strcmp causes a dramatic speedup.
> grepping the code, this should not cause any problems since every
> single query is currently consistanly lowercase. A simple test didn't
> turn up any immediate problems. Should I check in the one-line change
> to UT_stricmp to strcmp for property names?
>

This might break footer.abw which has the attribute "FOOTER" in uppercase.
Other than that we could make this change and just fix all occurances of
uppercase attributes/properties. After this change it will be easy enough
to detect if someone screws up and and puts in an uppercase
attribute/property.

I can see we can make some real efficiency gains by going to enumerated
constants. I think this would also be easier to maintain because all
defined attributes/properties would have to be listed in an obvious header
file.

However hunting down and changing all the calls will be a real pain.

I'm glad I didn't volenteer to do it :-)
------------------------------------------------------------------------

There is also real speed to be gained in the timer callback..

void FL_DocLayout::_redrawUpdate(UT_Timer * pTimer)

and in

FL_DocLayout::updateLayout()

The callback is called every 500 msec and itterates over the whole
document to redraw the layout. updateLayout() also itterates over the
whole document. It should be possible to limit these routines to just
looking from the block just previous to the first viewable position in the
document to the block just after the last position in the document that's
on screen.

Any volenteers to experiment with this code?

Cheers

Martin



This archive was generated by hypermail 2b25 : Mon Dec 18 2000 - 06:50:42 CST