On Sep 11, 2009, at 2:52 PM, Perrin Harkins wrote:

On Fri, Sep 11, 2009 at 5:26 PM, Jonathan Swartz <swa...@pobox.com> wrote:
This is the nicest solution I've seen so far. The only problem I can see is its performance - each potentially-changing module has to be loaded on each
request. **

How long does it take for you?  I've run a lot of large mod_perl apps
this way and never seen it take more than 3 seconds to compile and
generate a page.  Maybe this is only an issue with Moose?  Or maybe
there's some expensive initialization that could be skipped in
development?


It can take a few seconds to load all our modules (sans the CPAN modules they use). Perhaps I'm particularly sensitive to development environment efficiency. But if we could codify a relatively simple solution that eliminates those seconds, why not?

Anyway, another approach would be to set MaxClients to 1 and install
cleanup handler that kills the current process if it sees that any of
the watched modules have been changed.  Then you don't need a separate
process.


But if you change a module, wouldn't your first subsequent request hit the 'old' code? That's the benefit of an independent watcher, it'll operate in the time between when you've changed your module and when you hit the server again.

Jon

Reply via email to