Re: Win32 performance results


Subject: Re: Win32 performance results
From: Paul Rohr (paul@abisource.com)
Date: Wed Mar 07 2001 - 11:46:15 CST


Mike,

Thanks for the profiling. I'm pleased to see that most of this logic
already seems to be tuned pretty well.

At 04:52 PM 3/7/01 +0100, Mike Nordell wrote:
>What can we learn from this? Well, for starters every experienced Win32
>developer knows that LineTo is quite bad. When drawing horz/vert lines (or
>filled boxes), the fastest way to do this is by calling ExtTextOut (don't
>ask, you don't want to know). CreatePen is slow, but LineTo is slower. Worth
>noting is that this function is "only" called 22 824 times, but it's
>responsible for 8.47% CPU.

Blush. So long as profiling confirms that any specific fixes like this are
faster, by all means check them in. Please. :-)

If you wind up changing the Win32 implementations for XP classes, the only
thing to watch out for is making sure that the coordinates still work out
properly for stuff like drawing clean corners on the drop-shadows of the
page layout view. When we first implemented these primitives, we had to
sort through a bunch of off-by-one issues on various platforms.

>The calls to GetObject to get the LOGFONT struct should really be replaced
>by putting the LOGFONT in the Win32Font and only call it once for each font.
>
>Can we do something about all the calls to GR_Graphics::remapGlyph? It calls
>XAP_Prefs::getCurrentScheme and XAP_App::getPrefs twice for each invocation.

These both sound like places where some intelligent caching could help. Of
course, all of the usual cache maintenance caveats apply.

>Can we do something about the gazillion calls to remapGlyph and
>measureUnRemappedChar?

Good question. What little I ever knew about that code is long since
forgotten. Bill? Thomas?

Paul



This archive was generated by hypermail 2b25 : Wed Mar 07 2001 - 11:44:31 CST