FAQ
Hi folks -- this may be more of a FormHandler question than a Catalyst
question but I thought I'd check here to see if it's just us:

We've been using HTML::FormHandler and are basically happy with it... until
the performance issue mentioned below hit us. Any Catalystas running into
50-second turnaround time with H:FH?

[info] Request took 51.956100s (0.019/s)
.------------------------------------------------------------+-----------.
Action | Time |
+------------------------------------------------------------+-----------+
/auto | 0.000181s |
/auth | 0.001857s |
/ticket/base | 0.004652s |
/ticket/item | 0.005865s |
/ticket/edit | 51.88091s |
Base:EDIT | 51.88050s |
get FORM | 0.000078s |
process FORM | *51.87286s* |
/end | 0.000290s |
'------------------------------------------------------------+-----------'

Turnaround time ranges from 6 seconds to 50+ seconds, with no discernable
pattern to the delay. (We can edit the same record multiple times and get
wildly differing lags.)

The code for the processing is basically as follows:

$stats->profile(begin=>'get FORM');
my $form = $self->form;
$stats->profile(end=>'get FORM');
my $params = $c->req->params;
$stats->profile(begin=>'process FORM');
my $processed = $form->process(
item => $item,
params => $params,
);
$stats->profile(end=>'process FORM');

System load for this (Linode) server was 0.04 or below during all our tests.
There are 31 fields in this form relating to one table in the database; two
of these forms are *many_to_many* with linking tables.

Ideas?

--
11 cheers for binary!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110411/fac2b013/attachment.htm

Search Discussions

  • Peter Edwards at Apr 12, 2011 at 7:30 am

    On 12 April 2011 02:53, will trillich wrote:

    Hi folks -- this may be more of a FormHandler question than a Catalyst
    question but I thought I'd check here to see if it's just us:

    We've been using HTML::FormHandler and are basically happy with it... until
    the performance issue mentioned below hit us. Any Catalystas running into
    50-second turnaround time with H:FH?

    [info] Request took 51.956100s (0.019/s)
    .------------------------------------------------------------+-----------.
    Action | Time |
    +------------------------------------------------------------+-----------+
    /auto | 0.000181s |
    /auth | 0.001857s |
    /ticket/base | 0.004652s |
    /ticket/item | 0.005865s |
    /ticket/edit | 51.88091s |
    Base:EDIT | 51.88050s |
    get FORM | 0.000078s |
    process FORM | *51.87286s*|
    /end | 0.000290s |
    '------------------------------------------------------------+-----------'

    Turnaround time ranges from 6 seconds to 50+ seconds, with no discernable
    pattern to the delay. (We can edit the same record multiple times and get
    wildly differing lags.)


    Run your test server with perl -d:NYTProf myapp.pl and see which routines
    use the time http://search.cpan.org/perldoc?Devel::NYTProf .
    Maybe it is blocking on DNS network lookups.
    Or if the time isused around the database calls, run with DBIC_TRACE=1 perl
    myapp.pl and watch and see which are the slow ones, then run your database
    query optimiser like EXPLAIN SELECT foo;
    http://dev.mysql.com/doc/refman/5.0/en/explain.html
    http://www.postgresql.org/docs/8.3/static/sql-explain.html
    Are other processes/users accessing the same database? If so check for lock
    competition. Also disk space.

    Regards, Peter
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110412/df9dad67/attachment.htm
  • Will Trillich at Apr 12, 2011 at 1:14 pm
    Thanks for the tips, Peter -- and for
    http://dragonstaff.blogspot.com/2009/05/testing-with-perl-catalyst.html! Got
    some cranking to do...

    On Tue, Apr 12, 2011 at 2:30 AM, Peter Edwards wrote:
    On 12 April 2011 02:53, will trillich wrote:

    Hi folks -- this may be more of a FormHandler question than a Catalyst
    question but I thought I'd check here to see if it's just us:

    We've been using HTML::FormHandler and are basically happy with it...
    until the performance issue mentioned below hit us. Any Catalystas running
    into 50-second turnaround time with H:FH?

    [info] Request took 51.956100s (0.019/s)
    .------------------------------------------------------------+-----------.
    Action | Time |
    +------------------------------------------------------------+-----------+
    /auto | 0.000181s |
    /auth | 0.001857s |
    /ticket/base | 0.004652s |
    /ticket/item | 0.005865s |
    /ticket/edit | 51.88091s |
    Base:EDIT | 51.88050s |
    get FORM | 0.000078s

    process FORM | *51.87286s * |
    /end | 0.000290s |
    '------------------------------------------------------------+-----------'

    Turnaround time ranges from 6 seconds to 50+ seconds, with no discernable
    pattern to the delay. (We can edit the same record multiple times and get
    wildly differing lags.)


    Run your test server with perl -d:NYTProf myapp.pl and see which routines
    use the time http://search.cpan.org/perldoc?Devel::NYTProf .
    Maybe it is blocking on DNS network lookups.
    Or if the time isused around the database calls, run with DBIC_TRACE=1 perl
    myapp.pl and watch and see which are the slow ones, then run your
    database query optimiser like EXPLAIN SELECT foo;
    http://dev.mysql.com/doc/refman/5.0/en/explain.html
    http://www.postgresql.org/docs/8.3/static/sql-explain.html
    Are other processes/users accessing the same database? If so check for lock
    competition. Also disk space.

    Regards, Peter



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

    --
    11 cheers for binary!
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110412/14d20401/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 12, '11 at 1:53a
activeApr 12, '11 at 1:14p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Will Trillich: 2 posts Peter Edwards: 1 post

People

Translate

site design / logo © 2022 Grokbase