Closed
Bug 350949
Opened 18 years ago
Closed 18 years ago
Feed preview leaks memory
Categories
(Firefox Graveyard :: RSS Discovery and Preview, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
Firefox 2
People
(Reporter: erwan, Assigned: sayrer)
References
()
Details
(Keywords: fixed1.8.1, memory-leak)
Attachments
(3 files, 1 obsolete file)
3.89 KB,
patch
|
asaf
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
3.62 KB,
patch
|
vlad
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
1.08 KB,
patch
|
vlad
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 Each time a feed is previewed (showing the "Subscribe to this feed using...") a few hundreds of k are leaked. Reproducible: Always Steps to Reproduce: 1.Open a memory monitor 2.Open a feed in Firefox 3.Reload constantly the feed (shift+click reload) 4.Watch the memory usage grow up and never be freed Actual Results: Memory usage just grows up Expected Results: Constant memory usage I think the leak is in the HTMLUnescape function, in mozilla/components/feeds/src: http://lxr.mozilla.org/mozilla1.8/source/toolkit/components/feeds/src/nsScriptableUnescapeHTML.cpp#82 We were using it to convert HTML to plain text and noticed the leak. The function itself is very short and looks good, so the leak is probably in the HTMLToTextSink.
Updated•18 years ago
|
Updated•18 years ago
|
Flags: blocking-firefox2?
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•18 years ago
|
||
(In reply to comment #0) > > I think the leak is in the HTMLUnescape function, in > mozilla/components/feeds/src: I can't reproduce a leak in that function when testing it alone. Could you provide a narrower test case if you can reproduce it? There is a leak in the FeedResultService, where nsIFeedResults are not removed from the cache if the feed rendering is interupted by a reload. You should see no leak if you wait before pressing reload.
Assignee | ||
Comment 3•18 years ago
|
||
When refresh is hit rapidly, the same URI instance will be added twice.
Attachment #237151 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 4•18 years ago
|
||
forgot to delete some logging
Attachment #237151 -
Attachment is obsolete: true
Attachment #237152 -
Flags: review?(bugs.mano)
Attachment #237151 -
Flags: review?(bugs.mano)
Reporter | ||
Comment 5•18 years ago
|
||
(In reply to comment #2) > I can't reproduce a leak in that function when testing it alone. Could you > provide a narrower test case if you can reproduce it? I can still reproduce it. Even if I wait for the page to be rendered, I see the memory use goes up, then down but at the level it was before. (for exemple + 300 kb then - 150 k). In a different project, I was using the same function to strip html tags and the memory stopped leaking when a switched to simple regexp to strip the tags. I will try to make a testcase in xpcshell to isolate the leak. > There is a leak in the FeedResultService, where nsIFeedResults are not removed > from the cache if the feed rendering is interupted by a reload. You should see > no leak if you wait before pressing reload. I think this is unrelated to the leak I am talking about.
Comment 6•18 years ago
|
||
Comment on attachment 237152 [details] [diff] [review] Check for multiple list members r=mano.
Attachment #237152 -
Flags: review?(bugs.mano) → review+
Assignee | ||
Comment 7•18 years ago
|
||
Checking in feeds/src/FeedConverter.js; /cvsroot/mozilla/browser/components/feeds/src/FeedConverter.js,v <-- FeedConverter.js new revision: 1.20; previous revision: 1.19 done Checking in feeds/src/FeedWriter.js; /cvsroot/mozilla/browser/components/feeds/src/FeedWriter.js,v <-- FeedWriter.js new revision: 1.15; previous revision: 1.14 done
Assignee | ||
Comment 8•18 years ago
|
||
Comment on attachment 237152 [details] [diff] [review] Check for multiple list members drivers: this is low-risk, needed to prevent a big leak when reload is hit extremely rapidly.
Attachment #237152 -
Flags: approval1.8.1?
Comment 9•18 years ago
|
||
Comment on attachment 237152 [details] [diff] [review] Check for multiple list members a=beltzner on behalf of 181drivers
Attachment #237152 -
Flags: approval1.8.1? → approval1.8.1+
Updated•18 years ago
|
Whiteboard: [checkin needed (1.8 branch)]
Assignee | ||
Comment 10•18 years ago
|
||
Checking in FeedWriter.js; /cvsroot/mozilla/browser/components/feeds/src/FeedWriter.js,v <-- FeedWriter.js new revision: 1.2.2.18; previous revision: 1.2.2.17 done Checking in FeedConverter.js; /cvsroot/mozilla/browser/components/feeds/src/FeedConverter.js,v <-- FeedConverter.js new revision: 1.1.2.20; previous revision: 1.1.2.19 done
Whiteboard: [checkin needed (1.8 branch)]
Updated•18 years ago
|
Keywords: fixed1.8.1
Assignee | ||
Comment 11•18 years ago
|
||
This property is pretty useless. I never should have added it. As a bonus, it creates reference cycles.
Attachment #237809 -
Flags: review?(vladimir)
Comment on attachment 237809 [details] [diff] [review] remove nsIFeedEntry.parent Sounds good to me
Attachment #237809 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 13•18 years ago
|
||
Comment on attachment 237809 [details] [diff] [review] remove nsIFeedEntry.parent drivers low risk, removing unused API.
Attachment #237809 -
Flags: approval1.8.1?
Assignee | ||
Comment 14•18 years ago
|
||
this was recently exposed by changing sendResult(). we don't use the sync methods in Fx, but the test harness does. saw the leak there.
Attachment #237815 -
Flags: review?(vladimir)
Attachment #237815 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #237815 -
Flags: approval1.8.1?
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.1
Updated•18 years ago
|
Whiteboard: [has patch][needs approval]
Comment 15•18 years ago
|
||
Comment on attachment 237809 [details] [diff] [review] remove nsIFeedEntry.parent a=schrep for 181drivers
Attachment #237809 -
Flags: approval1.8.1? → approval1.8.1+
Comment 16•18 years ago
|
||
Comment on attachment 237815 [details] [diff] [review] set reader to null for the sync methods a=schrep for 181drivers
Attachment #237815 -
Flags: approval1.8.1? → approval1.8.1+
Updated•18 years ago
|
Whiteboard: [has patch][needs approval] → [checkin needed (1.8 branch)]
Assignee | ||
Comment 17•18 years ago
|
||
checkin branch attachment 237815 [details] [diff] [review] and attachment 237809 [details] [diff] [review] Checking in public/nsIFeedEntry.idl; /cvsroot/mozilla/toolkit/components/feeds/public/nsIFeedEntry.idl,v <-- nsIFeedEntry.idl new revision: 1.1.2.5; previous revision: 1.1.2.4 done Checking in src/FeedProcessor.js; /cvsroot/mozilla/toolkit/components/feeds/src/FeedProcessor.js,v <-- FeedProcessor.js new revision: 1.1.2.13; previous revision: 1.1.2.12 done
Whiteboard: [checkin needed (1.8 branch)]
Updated•18 years ago
|
Whiteboard: [has patch][checkin needed (1.8 branch)]
Assignee | ||
Comment 18•18 years ago
|
||
so, I've chased down everything I can find here, but the Flock guys say they have a leak, so I'm not closing it.
Assignee | ||
Updated•18 years ago
|
Whiteboard: [has patch][checkin needed (1.8 branch)]
Assignee | ||
Comment 19•18 years ago
|
||
resolved fixed. Erwan: file a new bug and CC me if you can get a small test case.
Reporter | ||
Comment 20•18 years ago
|
||
Thank you Robert. I'll grab a new build and see if I can reproduce the bug in a small xpcshell script.
Comment 21•15 years ago
|
||
On Firefox 3.5, I tested the planet planet.mozilla.org feed and reloaded it repeatedly. After a few seconds garbage collection (or something similar) occurred and memory went back to normal, and when the tab was closed it returned to the memory level from before the feed was opened. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Verifying as fixed; removing qawanted. Is there anything else that needs to be verified or checked?
Status: RESOLVED → VERIFIED
Keywords: qawanted
Updated•5 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•