Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

hctif (5429)

  (email not shown publicly)

Bio (this information is publicly displayed on your user page. 255 chars)

Journal of hctif (5429)

Wednesday June 15, 2005
08:43 AM

In praise of Text:::MicroMason

[ #25211 ]
I have been using the Template Toolkit for a while but came across a nasty performance degradation when my input data hash ballooned from 1K to 10K items - the CPU maxed out for up to 2 minutes while a single 2MB template was generated.

Much googling eventually turned up this interesting benchmark so I decided to give Text::MicroMason a whirl.

A quick trip to CPAN, an hour to convert the 150 line template from TT to MM syntax, and what do you know - identical output being produced in less than 10% of the time! The author says it all:

[Text::MicroMason] provides a reasonable subset of HTML::Mason syntax in a very light-weight fashion. In comparison to the other modules listed, MicroMason aims to be fairly lightweight, using one eval per parse, converting the template to an (sic) cacheable unblessed subroutine ref, eschewing method calls, and containing less than a thousand lines of Perl code.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.