General performance [was: drawing performance]


Subject: General performance [was: drawing performance]
From: Mike Nordell (tamlin@algonet.se)
Date: Sun Dec 17 2000 - 18:44:51 CST


Tomas Frydrych wrote:
> I think the the drawing performance could be significantly improved
> if the string library found in UT_strings is replaced with one
> hand-written in Assembler.

Possibly true, but not an option.

What is really, and I mean *really*, killing performance is "tolower" calls.
I started with a fresh document, input around 100 chars and then exited AW.
This resulted in 1079769 (yes, over *one million*!) calls to tolower, all
but 596 from UT_stricmp. This one is in turn called about 84% of the time
from PP_lookupProperty why I begin examining that one.

PP_lookupProperty was called 10691 times, only from PP_evalProperty,
resulting in 163243 calls to UT_stricmp. During this test, PP_evalProperty
and its calls was responsible for sucking up 45% CPU time (which in this
case evaluated to *over one second*). PP_evalProperty itself was only using
about 0.04% CPU.

I think I end my examintation here. It's clear that this is a killer, and to
fix it we would have to let the property system (conditionally?) use "atoms"
for the property names it currently understands instead of the current
scheme of comparing strings.

May I also with this post humbly suggest that we allow platforms to
implement some of these string functions (read: use their own CRT non-ANSI
string functions if they exist)? I know for sure that at least the CRT I'm
using is *way* faster than out XP implementation of eg UT_stricmp.

/Mike - please don't cc



This archive was generated by hypermail 2b25 : Sun Dec 17 2000 - 18:47:47 CST