in reply to Re: Re: Re: modules slowing webpage
in thread modules slowing webpage

The real question is why do we have to wait for perl to compile a module, i mean its going to be compiled the same everytime isn't it?

When a module is loaded, it isn't just "compiled" -- it undergoes a multi-part process including parsing and execution that produce run-time changes in the state of the Perl interpreter. A module can load other modules, install symbols in other packages, and perform other "compile-time" actions that are difficult to freeze in a static form.

As a result, most of the dump/compile techniques are intended to work with entire programs, not individual modules. (See the perlcompile manpage and the B::CC module.)

I think you might be able to process individual modules using B::Bytecode and ByteLoader. This might improve performance by a bit, but I believe the overhead and limitations will prove daunting.

  • Comment on Re: Re: Re: Re: modules slowing webpage