How can I improve Moose performance in non-persistent CGI processes?

前端 未结 6 1313
情歌与酒
情歌与酒 2021-02-06 00:13

Moose is a fantastic object framework. The trouble is that, taken together with its dependencies, it\'s very big. Our profiling indicates that on our platform, simply

6条回答
  •  执念已碎
    2021-02-06 00:57

    The basic idea of App::Persistent, pperl, SpeedyCGI and probably some others is that the process of compiling your Perl program to byte code is only done once and some sort of caching is used on invocations after that. Since Moose is said to have quite a compile-time penalty, I'd try this approach first.

    I have successfully used pperl for drawing lots of MRTG graphs on an ancient system around 2001. The Perl program was executed for every graph which was quite an overhead -- this probably comparable to your CGI scenario.

提交回复
热议问题