<div class="gmail_quote">On Wed, Apr 13, 2011 at 1:19 AM, Darren Duncan <span dir="ltr"><<a href="mailto:darren@darrenduncan.net" target="_blank">darren@darrenduncan.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
will trillich wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>70% of the time is taken up in five modules:<br>
1) SQL::Abstract<br>
2) DBIx::Class::ResultSet<br>
3) Class::Accessor::Grouped<br>
4) DBIx::Class::Storage::DBI<br>
5) HTML::FormHandler::Field<br>
...because in 200 iterations they were called millions of times each. (The form requested has several select/option menus.)<br>
</div></blockquote>
<br>
So, several 5000s (millions / 200) of calls for a single screen? That sounds like a lot for one screen. Do you need that much? -- Darren Duncan<div><div></div><div></div></div></blockquote></div><div><br></div>
<div>My question is similar -- why five thousand or more calls for rendering one page? The code does simple things like</div><div><font face="'courier new', monospace">my $form = $self->form;</font></div>
<div><font face="'courier new', monospace"># parse_form_for_numerics():</font></div><div><font face="'courier new', monospace"># change any $1,234 to 1234, parse 12-apr-09 to a date 2009-04-12, etc</font></div>
<div><font face="'courier new', monospace"># and stuff results into $c->req->params</font></div><div><font face="'courier new', monospace">&parse_form_for_numerics( $c, $form ); </font></div>
<div><font face="'courier new', monospace">my $processed = $form->process(</font></div><div><font face="'courier new', monospace"> item => $item,</font></div>
<div><font face="'courier new', monospace"> params => $c->req->params,<br></font><div><font face="'courier new', monospace">);</font></div><div><font face="'courier new', monospace">if ( $form->has_errors) { ... }</font></div>
<div><font face="'courier new', monospace">return unless $processed;</font></div><div><font face="'courier new', monospace"># since we're testing rendering a fresh page there's no processing, that's it</font></div>
<div><br></div><div>So why would this simple code generate 5,000+ calls to SQL::Abstract methods</div><div>or to DBIx::Class::Resultset methods? Even commenting-out #parse_form_for_numerics()</div><div>it's about the same. Still looking into this.</div>
<div><br>-- <br>11 cheers for binary!<br>
</div></div>