>From what I recall - the caching trait doesn't play with joins. From what I can tell - neither does H::FH; Can anyone confirm this? It might make more sense for your queries to always specify a deep join/prefetch option to reduce the number of queries.<div>
<br></div><div>I see this statement as well:</div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
"This feature is new. It doesn't handle relationships yet, and the interfaces are still subject to change."</blockquote>... which leads me to believe that efficient joins aren't implemented<br><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
<br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://search.cpan.org/~gshank/HTML-FormHandler-Model-DBIC-0.14/lib/HTML/FormHandler/TraitFor/DBICFields.pm">http://search.cpan.org/~gshank/HTML-FormHandler-Model-DBIC-0.14/lib/HTML/FormHandler/TraitFor/DBICFields.pm</a></div>
<div><br></div><div><a href="http://search.cpan.org/~gshank/HTML-FormHandler-Model-DBIC-0.14/lib/HTML/FormHandler/TraitFor/DBICFields.pm"></a>cheers,</div><div>-nw<br><br><div class="gmail_quote">On Thu, Apr 14, 2011 at 10:53 AM, Hernan Lopes <span dir="ltr"><<a href="mailto:hernanlopes@gmail.com">hernanlopes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><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"><div><div></div><div class="h5">On Thu, Apr 14, 2011 at 1:15 PM, will trillich <span dir="ltr"><<a href="mailto:will.trillich@serensoft.com" target="_blank">will.trillich@serensoft.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
<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><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></div></div><div class="im">_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">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></div></blockquote></div><br>
<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></div>