Possibly fixed in Chrome 5.0.375.99? While briefly watching the Chrome Task
Manager window with a 1 Hz counter running in an extension's popup, memory
recovery seemed to be operating much more aggressively. Will leave running
overnight a few times to verify.
Thanks for reminding me. I'm not completely sure this is fixed, but I
estimate that users will /probably/ close Chrome voluntarily at the end of
a session before extension memory use becomes a problem again.
I will tentatively suggest marking this as either fixed or low priority
because of the following:
Behaviour under the specified circumstance is much improved. Extension
memory usage now climbs much more slowly, and portions of memory are
released much more quickly.
Memory use now rises and falls like a chaotic oscillator (lacking an
obvious pattern, but each 1 Hz measurement is within predictable bounds,
relative to the previous measurment). For example, memory usage for Digital
Clock can have a typical kilobyte value series of:
5935, 5442, 5688, 5714, 4880, 4992, 5080, 5332, 5010, 5040, 5220, 5224,
5372, 5580, 5084, 5172, 5204, 5284, 5368, 5512, 5604, 5352, 5762, 5744,
5820, 5248, 5204, 5244, 5316, 5384, 5452, 5540, 5588, 5660, 5348, 5520,
5526, 5700, 5752, 5876, 5380, 5464, 5372, 5426, 5516, 5600, 5652, 5780,
5496, 5600, 5656, 5740, 5792, 5808, 5412, 5532, 5432, 5440, 5536, 5580,
5672, 5760, 5812, 5896, 6048, 5692, 5764, 5868, 5936, 6060, 6160, 6180,
6240, 6380, 6464, 6592, 7020, 6648, 6744, 6020, 6988, 7020, 7280, 7330,
7636, 7188, 7288, 7512, 7728, 7812, 7936, 8172, 7808, 7896, 8052, 8196,
8288, 8456...
Important things to note about this series are:
1. Memory usage reported by Chrome's Task Manager in this scenario
frequently decreases but the floor value (lowest possible) value for each
update gradually rises. This is observable in the course of an hour.
2. Although the values are actual samples, I missed one to three samples
between each reported value. (Is there an API to record Chrome memory usage
values?)
I made a variant of Digital Clock which minimizes the effect of the problem.
https://chrome.google.com/extensions/detail/hgkhmaaifnednibcengdengamkllpppb
My variant initially starts with about 1 MB more memory than the original,
then the original falls about 1 MB, the after an hour the memory usage of
mine remains around 6 - 7 MB and the original author's Digital Clock has
climbed to 14-24 MB (with chaotic oscillation near those values).
The original Digital Clock's memory use climbs at a reduced rate from
before. At the time of the original report, I observed a linear increase of
~240 KB/min.; now the maximum observed value for a an hour duration is
close to to that, but the minimum is about half as much. After two hours,
the original Digital Clock oscillates chaotically around 14-28 MB.
Comment #6 on issue 35330 by mpcom...@chromium.org: Extensions leak
memory when clicked and when updating icon, badge, or popup
http://code.google.com/p/chromium/issues/detail?id=35330
Thanks for the thorough analysis. It sounds like something bad is still
happening, and is worth investigating some more.