Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Profiling shows Catalyst::Engine::write slowest ?

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


stef at ummon

Aug 6, 2008, 4:19 PM

Post #1 of 3 (384 views)
Permalink
Profiling shows Catalyst::Engine::write slowest ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey Everyone,
So, I have an application almost done and dusted, although the
pages are slow. I mean 'multiple seconds' per page slow. So, with this
in mind, I flung catalyst through Devel::DProf (which is an old
mainstay) on the script running (./script/myapp_server) and I find
that the two most common 'slow-downs' are ;

%Time ExclSec CumulS #Calls sec/call Csec/c Name
0.00 4.380 4.380 130 0.0337 0.0337 Catalyst::Engine::write
0.00 2.090 2.090 318 0.0066 0.0066 DBD::Pg::db::_login

The question arises, how on earth do I fix/improve these ? From
what I assume (dangerous I know), the catalyst engine write is the
output from the templating write, how can I improve that speed ? I am
using fastcgi on the 'main server' but it's still "as slow". Also the
DBD::Pg login could be 'pooled', although I use dbix::class(::schema),
has anyone done this ?

I am kinda scratching my head on this, any
pointers/help/ideas/smacking with manual is appreciated :D
Regards
Stef
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImjGHANG7uQ+9D9URAp4XAJ0QCpPXumfhIkH+HrqkanW8/XzNgACeLXX5
lF1L0/TWDQFY/W4smNVEIw8=
=jiKu
-----END PGP SIGNATURE-----


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


stef at ummon

Aug 6, 2008, 6:03 PM

Post #2 of 3 (360 views)
Permalink
Re: Profiling shows Catalyst::Engine::write slowest ? [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stef Telford wrote:
> Hey Everyone, So, I have an application almost done and dusted,
> although the pages are slow. I mean 'multiple seconds' per page
> slow. So, with this in mind, I flung catalyst through Devel::DProf
> (which is an old mainstay) on the script running
> (./script/myapp_server) and I find that the two most common
> 'slow-downs' are ;
>
> %Time ExclSec CumulS #Calls sec/call Csec/c Name 0.00 4.380
> 4.380 130 0.0337 0.0337 Catalyst::Engine::write 0.00 2.090
> 2.090 318 0.0066 0.0066 DBD::Pg::db::_login
>
> The question arises, how on earth do I fix/improve these ? From
> what I assume (dangerous I know), the catalyst engine write is the
> output from the templating write, how can I improve that speed ? I
> am using fastcgi on the 'main server' but it's still "as slow".
> Also the DBD::Pg login could be 'pooled', although I use
> dbix::class(::schema), has anyone done this ?
>
> I am kinda scratching my head on this, any
> pointers/help/ideas/smacking with manual is appreciated :D Regards
> Stef
Hey Everyone,
Okay, so, colour me stupid, Compess::Gzip helps with the write
output delivery (because that's mostly down to the network connection
speed), however, Catalyst and DBIx::Class Pooling/Persistance ? Anyone
set this up before ?

Regards
Stef
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImknmANG7uQ+9D9URArwuAJ0eeQE26OZx8QMUeDDoegXnp4QC+gCfXJzb
XG/gQqiY4iT0NFbdsj/kNiU=
=OXnt
-----END PGP SIGNATURE-----


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


dbix-class at trout

Aug 7, 2008, 6:52 PM

Post #3 of 3 (347 views)
Permalink
Re: Profiling shows Catalyst::Engine::write slowest ? [In reply to]

On Wed, Aug 06, 2008 at 09:03:35PM -0400, Stef Telford wrote:
> > The question arises, how on earth do I fix/improve these ? From
> > what I assume (dangerous I know), the catalyst engine write is the
> > output from the templating write, how can I improve that speed ? I
> > am using fastcgi on the 'main server' but it's still "as slow".
> > Also the DBD::Pg login could be 'pooled', although I use
> > dbix::class(::schema), has anyone done this ?
> >
> > I am kinda scratching my head on this, any
> > pointers/help/ideas/smacking with manual is appreciated :D Regards
> > Stef
> Hey Everyone,
> Okay, so, colour me stupid, Compess::Gzip helps with the write
> output delivery (because that's mostly down to the network connection
> speed), however, Catalyst and DBIx::Class Pooling/Persistance ? Anyone
> set this up before ?

If you're using Catalyst::Model::DBIC::Schema then the schema instance
is retained so the connection should be persistent - assuming your db
server doesn't kick you off you'll only connect on the first request
per process that hits the db.

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.