x
Loading
 Loading
Hello, Guest | Login | Register

Profiling in Template Toolkit

The Template Toolkit does not support any profiling tools “out of the box.” However, that didn’t stop Randal from getting the numbers — and the performance boost — he needed.

Over the past year or so, I’ve talked a lot about Andy Wardley’s Template Toolkit (TT, http://http://www.template-toolkit.org/), because I’ve been using the software extensively to build a number of significant web sites. Of course, “build” means “solving problems,” or scratching my head until that precious “aha! ” moment comes along.
For example, I recently completed the features of a deliverable web site, but as the customer started playing with it, one of his first comments was, “This part is too slow, and I spend all my time on this screen.” That wasn’t a show-stopper, though, because I’d deliberately chosen to program the application with flexibility and ease-of-implementation first, knowing that I’d need to make a performance pass later to optimize anything that was too slow. (Avoid the perils of premature optimization, or making decisions about performance before actually understanding where the bottlenecks are.)
“No problem”, I said, “because I’ll just trot out Devel::DProf to find the hot spots and slow spots and optimize those.” But, alas, adding Devel::DProf caused the program to dump core. Ugh. Even moving the code to a different architecture (from my Mac OS X development platform to the OpenBSD deployment platform) proved to be fruitless.
This wasn’t looking good — for the application or my income.
After fretting a bit and asking for help in all the usual places online, I decided that I still needed to know where the program was spending its time. I suspected that…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace