Small memory leak, likely related to icons

Bug #463273 reported by pragmattica
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Caffeine
Fix Released
Medium
Isaiah Heyer

Bug Description

Bug 460124 was related to a critically huge memory leak that could lose hundreds of megabytes per day. This was improved dramatically, and Caffeine now only leaks about 3-4 MB per day. Still, although this leak is smaller, it is still significant and should be fixed. The leak is likely not due to our own code, but seems to be a leak related to icons. The "load_icon_for_process" function is a likely candidate. Most applications probably just load a set of a few icons and then use them for as long as the application is running, while we are loading a new set of application icons every few seconds, when we refresh the process list. In order to prevent memory leakage, we could begin caching the icons, and only loading icons that haven't been loaded already. That would mean that we would load a hundred icons at the beginning, and then add 10 or 20 more as new programs are run, giving us a total memory leak of about 120 icons, which is insignificant, and would never leak more than a megabyte or so, even if every program on the whole system was run at least once. I would consider this caching system to be a reasonable fix to the problem. We may also wish to file a bug with the pygtk people.

pragmattica (bnsmith)
Changed in caffeine:
status: New → Confirmed
importance: Undecided → Medium
Changed in caffeine:
assignee: nobody → Isaiah Heyer (freshapplepy)
milestone: none → 1.0.1
Changed in caffeine:
status: Confirmed → Fix Committed
pragmattica (bnsmith)
Changed in caffeine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.