[dancer-users] Deploying a Dancer app with perlbrew under Apache

Warren Young warren at etr-usa.com
Tue May 6 18:49:15 BST 2014


On 5/6/2014 05:36, David Cantrell wrote:
> On Sat, May 03, 2014 at 09:00:39AM +0300, Octavian Rasnita wrote:
>
>> There may be very simple scripts which are used just once a week or month,
>> and not by the public but by a sysadmin for doing some settings. In those
>> cases using CGI is better than psgi, because they are more convenient to
>> create and don't stay loaded in memory and consume resources for no reason.
>
> If it's only used once a week it won't stay loaded in memory, it'll get
> swapped out if there are other tasks that need the memoryi or bits of
> the filesystem to cache. Reading it back from swap will be no slower
> than CGI.

Reading from cache skips the parsing and require/use resolution steps. 
The savings from compiling Dancer into the intermediate form alone 
should be worthwhile.

$ time 'perl -e print "x"'
x
real    0m0.001s
user    0m0.000s
sys     0m0.002s
$ time perl -e 'use Dancer;print "x"'
x
real    0m0.535s
user    0m0.110s
sys     0m0.012s

Half a second of page load latency is quite noticeable.


More information about the dancer-users mailing list