Perrin Harkins wrote:
On 3/8/07, Jim Spath <[EMAIL PROTECTED]> wrote:
On our development machine I ran myapp_server.pl through Devel::DProf,
hit it with a bunch of requests using ab, and got the following output:
Where's DBI? Did you sort this by wall time (-r flag)?
We are using Catalyst::Plugin::Cache::Memcached minimize hits to the
database. That is why you don't see DBI in there, but do see
Cache::Memcached.
Here is the output when I sort by wall time:
%Time ExclSec CumulS #Calls sec/call Csec/c Name
43.3 36.91 36.949 842 0.0438 0.0439
Catalyst::Engine::HTTP::_socket_data
8.64 7.346 89.845 1 7.3462 89.845 Catalyst::Engine::HTTP::run
7.73 6.572 6.669 15156 0.0004 0.0004 Cache::Memcached::__ANON__
2.71 2.308 2.308 21146 0.0001 0.0001 NEXT::ELSEWHERE::ancestors
2.58 2.197 8.867 5052 0.0004 0.0018 Cache::Memcached::_load_multi
2.39 2.036 2.036 282912 0.0000 0.0000
I18N::LangTags::is_language_tag
2.15 1.833 5.302 23695 0.0001 0.0002 NEXT::AUTOLOAD
1.76 1.501 1.703 253442 0.0000 0.0000 URI::_generic::authority
1.59 1.352 11.301 35365 0.0000 0.0003 Locale::Maketext::get_handle
1.55 1.318 1.832 70728 0.0000 0.0000
I18N::LangTags::super_languages
1.52 1.293 5.466 36207 0.0000 0.0002
I18N::LangTags::implicate_supers
1.49 1.267 31.495 6736 0.0002 0.0047 Template::Document::__ANON__
1.35 1.145 7.709 35365 0.0000 0.0002
Locale::Maketext::_langtag_munging
1.25 1.060 1.114 223130 0.0000 0.0000 URI::_generic::path
1.16 0.989 1.507 284605 0.0000 0.0000 URI::_scheme
Lastly, Template seems to be taking up around 6%. I suppose I could try
caching template output, but that will take some doing, as every page on
our site can vary per user.
You can try my Template::Plugin::Cache module if you like. It caches
the output of included templates so you can cache parts of a page
instead of all of it. I have a patch from Peter Karman that makes it
play nicely with Catalyst's cache plugins. There are also some things
you can do to improve TT performance, which have been discussed before
here and on the TT list.
- Perrin
Yeah, we could definitely divide up our templates a bit better so that
we can utilize template caching on the static portions.
Thanks for the quick feedback Perrin!
Jim
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/