<div class="gmail_quote">On Wed, Apr 13, 2011 at 1:19 AM, Darren Duncan <span dir="ltr">&lt;<a href="mailto:darren@darrenduncan.net" target="_blank">darren@darrenduncan.net</a>&gt;</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="&#39;courier new&#39;, monospace">my $form = $self-&gt;form;</font></div>
<div><font face="&#39;courier new&#39;, monospace"># parse_form_for_numerics():</font></div><div><font face="&#39;courier new&#39;, monospace"># change any $1,234 to 1234, parse 12-apr-09 to a date 2009-04-12, etc</font></div>

<div><font face="&#39;courier new&#39;, monospace"># and stuff results into $c-&gt;req-&gt;params</font></div><div><font face="&#39;courier new&#39;, monospace">&amp;parse_form_for_numerics( $c, $form ); </font></div>
<div><font face="&#39;courier new&#39;, monospace">my $processed = $form-&gt;process(</font></div><div><font face="&#39;courier new&#39;, monospace">  item =&gt; $item,</font></div>
<div><font face="&#39;courier new&#39;, monospace">  params =&gt; $c-&gt;req-&gt;params,<br></font><div><font face="&#39;courier new&#39;, monospace">);</font></div><div><font face="&#39;courier new&#39;, monospace">if ( $form-&gt;has_errors) { ... }</font></div>

<div><font face="&#39;courier new&#39;, monospace">return unless $processed;</font></div><div><font face="&#39;courier new&#39;, monospace"># since we&#39;re testing rendering a fresh page there&#39;s no processing, that&#39;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&#39;s about the same. Still looking into this.</div>

<div><br>-- <br>11 cheers for binary!<br>
</div></div>