On 30 Oct 2012, at 15:47, Hugh Barnard wrote:

> Hi 
> 
> On measurement in general, I'd recommend: Devel::NYTProf::Apache ; there's a 
> write up here:
> http://www.slideshare.net/bobcatfish/profiling-with-develnytprof 
> 

++

Personally, I'd not be using mod_perl if I could help it, but NYTProf is 
awesome!

> . It looks like I've been having performance problems because millions of 
> rows get blessed into objects, not sure of this but it looks like a DBIC 
> thing at the moment. 

Inflating a million objects is costly.

Are you really building an HTML page with a million rows? If so, why (isn't 
paging a better solution?)

I.e. I'd generally say you should either paginate things, or make the query 
return an aggregate set of results by doing the math or whatever at the DB 
server.

However, if you really do need to re-inflate a lot of stuff, look at 
DBIx::Class::ResultClass::HashRefInflator - given you only want the raw data 
and none of the clever, this is much much faster :)

Cheers
t0m


_______________________________________________
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/

Reply via email to