After writing the code from my last post I have spent some time tweaking it and running some bench marks. Not anything really exact, but enough to give me some idea about the direction I’m headed in.
This direction ain’t it. The code is very, very slow rendering web pages. I took a web page right from my existing web pages running through SnapLook. 1,000 hits took over 2 minutes, 17 seconds. Figuring out that I was not using the C ElementTree implementation I got the time down to 1 minute 58 seconds. Holy crap kind of slow. I haven’t read all of Kid’s code but I believe that since I am inserting XML markup into the template it has to regenerate an ElementTree and validate the template again. Since I already have an ElementTree I’d like to make it simpler but I don’t see how. Way too much XML parsing is going on.
SnapLook renders the same web page with a template that is much more featurefull (compared to stick this bit of XML in this tag) in less than 30 seconds for 1,000 hits.