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

Gene Hsu rt at hsufarm.com
Tue Apr 26 13:43:51 EDT 2005


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.

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



More information about the Rt-devel mailing list