[Rt-devel] Optimizing _BuildItemMap / ItemsArrayRef in Tickets_Overlay.pm

Jesse Vincent jesse at bestpractical.com
Tue Apr 26 14:06:53 EDT 2005


On Tue, Apr 26, 2005 at 10:43:51AM -0700, Gene Hsu wrote:
> I was wondering how one would go about optimizing _BuildItemMap found in
> Tickets_Overlay.pm.
> 
> One thing that it does on an unrealistic test database that has 10,000 
> results for a search query is that it loads each row into memory and sorts
> them.  Then _BuildItemMap only keeps the ticket id's.  This isn't bad, but
> for 10,000 tickets, with about 4k/row, that's 40MB of information that 
> needs to be transferred from the database.

What's your realistic test case?

> 
> Can _BuildItemMap be written such that it doesn't use ItemsArrayRef and
> uses a custom SQL query that pulls down only the ticket ids, instead?
> 
> -- Gene
> 
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
> 

-- 


More information about the Rt-devel mailing list