<div>i remember you mentioned something about many to many select options, try disabling those.. and then does the form works faster?<br></div><div>if so, then the problem is mostly like in there ... try populating your options manually</div>
<br><div class="gmail_quote">On Thu, Apr 14, 2011 at 1:15 PM, will trillich <span dir="ltr"><<a href="mailto:will.trillich@serensoft.com">will.trillich@serensoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<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:<div class="im"><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</blockquote></div></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>
<br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br>