Sure, libapreq and its included modules are the fastest way to parse parameters and handle cookies. However, hardly anyone needs that speed. Most people are spending all of their time talking to a database or doing other I/O tasks, or have pretty minimal web traffic, or both.
That's true. I spend more time optimising the database and the web ui then anything.

If you're writing something new, and you don't care about supporting CGI, and you want to use the fastest option, by all means give libapreq a try. For most people though, it won't make any measurable difference which one you use. I wouldn't advise anyone to bother changing CGI.pm code unless they've run a profiler and seen it show up high enough to matter.
Apache2::Request, and Apache2::Cookie looks like compatible replacements to CGI and CGI::Cookie. I think that's the objective anyway, so that when the need arises, it's just a simple replacement from the root function call (assuming factoring has been done). I think the difference will be whether the web application is a high traffic site-low cpu site, or a high cpu-low traffic one. The performance gain for the former will be more significant.


Reply via email to