[Jifty-commit] jifty branch, master, updated. jifty-1.10228-4-gd149993
Jifty commits
jifty-commit at lists.jifty.org
Tue Apr 5 20:14:19 EDT 2011
The branch, master has been updated
via d149993d123cb222fb495776493614124b00d6dc (commit)
from c4a44351764ac29881891df164c42f281f7cd040 (commit)
Summary of changes:
lib/Jifty.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit d149993d123cb222fb495776493614124b00d6dc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 5 20:11:43 2011 -0400
Only load view handlers and actions once
This speeds up startup, particularly under multi-threaded plack servers,
by allowing the view handlers and actions to be loaded once before
forking. This is safe because essentially no state is saved (and almost
certainly none is modified) on the Jifty::Handler and Jifty::API objects
between first and second initialization.
diff --git a/lib/Jifty.pm b/lib/Jifty.pm
index b7364a3..4dd88af 100644
--- a/lib/Jifty.pm
+++ b/lib/Jifty.pm
@@ -242,8 +242,8 @@ sub new {
$class_loader->require;
# Configure the request handler and action API handler
- Jifty->handler(Jifty::Handler->new());
- Jifty->api(Jifty::API->new());
+ Jifty->handler(Jifty::Handler->new()) unless Jifty->handler;
+ Jifty->api(Jifty::API->new()) unless Jifty->api;
# We can only require view classes once we have our models and actions set.
$class_loader->require_views;
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list