Your skill will accomplish what the force of many cannot |
|
PerlMonks |
[CLOSED] Reusing Compiled Perl or Opcode for Apache Serverby mlodato (Acolyte) |
on Aug 16, 2017 at 00:36 UTC ( [id://1197477]=perlquestion: print w/replies, xml ) | Need Help?? |
mlodato has asked for the wisdom of the Perl Monks concerning the following question: O wise ones, I have come to you in humility to ask a question for which I have little surrounding knowledge. Please take pity on me and ask for clarification so I can seek information to bring back to you. I work on a project that has a Perl back end behind an Apache server. The development servers are very slow. For certain production-like servers, we precache our static content and preload our Perl modules. Doing this takes a long time. It would be nice if it didn't take so long a second time if the Perl code hasn't changed. I was wondering - is there was a way to preload all of the Perl modules once and then serialize it in some way to be read in more quickly a second time? Note that I don't yet know exactly what "preloading Perl modules" means, but I am actively looking into it and maybe you don't need that information to answer the question because preloading is a common term. I have seen several posts saying that compiling Perl into C-like code is not yet a thing. That's fine, I'm not looking to optimize or hide the code. I have seen several posts saying that I can generate an executable with PAR::Packer. Maybe this can be used? I have seen several posts saying that Perl is first parsed into opcode before being run. I'm not sure if this is just for Perl 6, but if it's for Perl 5, I see no reason for that opcode to not be reusable...right? I have seen a post explaining that Perl can't be parsed. I find this confusing. Edit: After some digging it looks to my untrained eyes like "preloading" just calls use, load_class from Class::Load, and ->new for each module
Back to
Seekers of Perl Wisdom
|
|