1: I did this to see if it helped performance. It didn't, but I didn't change it back before posting.
2-3: I'll try these and see if they do anything interesting.
4: Yeah, I know. I've got a seriously hacked up copy of CGI::FastTemplate that I've been using for years, so it has a style that I've gotten used to and, more importantly, that the Web page designers I work with have gotten used to. It's also a PITA to maintain, so I rewrote it to be more legible (and I hoped faster, but it turns out not). I'm trying to decide if I should keep my hacked up copy of CGI::FastTemplate, use my rewritten replacement, or just use another engine. That got me started benchmarking different templating engines, which led to optimizing this sub. Maybe when I've done a little more research I'll Seek some Wisdom on the merits of the different templating engines...
| [reply] |
2: Didn't really help (a little slower, but probably just measuring error)
Before:
%Time ExclSec CumulS #Calls sec/call Csec/c Name
48.8 20.83 20.710 130000 0.0002 0.0002 FTS::printto
After 2
%Time ExclSec CumulS #Calls sec/call Csec/c Name
51.2 23.74 23.620 130000 0.0002 0.0002 FTS::printto
3: Ditto.
After 3
%Time ExclSec CumulS #Calls sec/call Csec/c Name
49.5 21.00 20.880 130000 0.0002 0.0002 FTS::printto
| [reply] |