Closed Bug 670283 Opened 13 years ago Closed 12 years ago

throw away cycle collector hash table immediately after MarkRoots()

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mccr8, Unassigned)

References

Details

As I wrote in Bug 665995, njn found that the CC hash table uses more memory than the CC graph, in at least one run.  The CC hash table is only needed until MarkRoots() is finished, but is kept alive through ScanRoots() and FinishTraverse() as well.  If we introduce a new block scope that ends after MarkRoots (and fuss around with the code a bit) we can free the hash table earlier.  Probably not a huge win, but it should be pretty easy to do.
Blocks: 638299
One drawback of this is that doing it will require changing the indentation for a lot of BeginCollection(), which will totally trash blame.
"trash blame" is an overstatement - just means that tracking blame for that part of the file will involve one more step (in a process that often takes more than one step anyways).
Yeah that's true.  I just mostly don't like the ugly diff this mostly simple change will produce.
This basically just reduces memory usage during ScanRoots, but ScanRoots barely takes any time ever, so this change is probably not worth bothering with right now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.