[Rt-devel] Memory 'leak' in Ticket/Display.html

Bram rtdevel at lists.wizbit.be
Thu Jul 23 07:31:48 EDT 2009


Quoting Bram <rtdevel at lists.wizbit.be>:

> Hi,
>
>
> When a large search is done and the user clicks the link to display
> the ticket then apache starts using a lot more memory.
> This is due to a memory 'leak' in share/html/Ticket/Display.html:
>
> http://github.com/bestpractical/rt/blob/90546414c8887e344f995da5f20f53a58939bbd8/share/html/Ticket/Display.html
> lines 200-206:

This also happens in  
http://github.com/bestpractical/rt/blob/90546414c8887e344f995da5f20f53a58939bbd8/share/html/Ticket/Elements/Tabs
lines 69-73.

There PrepForSerialization is called but that still leaves items,
item_map and dbix_sb_unique_cache to contain data.

When both are completly cleared there still is a 40 mb increase in  
memory usage on a display page (after a search which returned 13000  
tickets) because it builds the entire ItemMap.

This looks like overkill to me because it only 4 values are used....  
(that is: first, last, next and prev). Perhaps ItemMap can be improved  
so that it only looks up the first, last, next and prev value relative  
to the ticket that is being viewed?


Best regards,

Bram






More information about the Rt-devel mailing list