I ran wole through gprof recently to see if I can speed it up a bit... imagine my surprize to learn that 47% of wole's total CPU time is spent - not on drawing, not on calculating, not on launching children - not even the very complex recursive function used to compare version numbers but purely on uppercase(ansistring).
Now indeed I do use a few (about 5) such calls, mostly for the purpose of doing case independent string checks such as if pos('<ITEM>',uppercase(RSS)) = 0 then Now some things to considder: RSS here is the single ansistring format of an entire RSS source - so yes, it's quite big, probably several kilobytes (but not megabytes), so that could be part of why uppercase takes so much time - also there are at least 3 such sources in a typical run - so this particular one runs three times. Nonetheless - should uppercase take up THAT much CPU time ? The RSS parser code I use makes quite a lot of use of the abilities that come from reading tstringlist as a single string, could be VERY hard to rewrite, but even so the rest of it doesn't seem to be using much CPU at all anyway. Should I rewrite this test ? If so... how would you suggest I do it ? Ciao A.J. -- "80% Of a hardware engineer's job is application of the uncertainty principle. 80% of a software engineer's job is pretending this isn't so." A.J. Venter Chief Software Architect OpenLab International | +27 83 455 99 78 (South Africa) http://www.getopenlab.com | 086 654 2898 (Fax) http://www.silentcoder.co.za | +55 118 162 2079 (Brazil) GPG Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x27CFFE5A
pgp2Yqb3gqFHy.pgp
Description: PGP signature