Closed Bug 1372569 Opened 7 years ago Closed 7 years ago

Don't sweep empty weak caches

Categories

(Core :: JavaScript: GC, enhancement)

55 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

I did some rough measurements in the browser and ~45% of the weak caches we sweep are empty.  We should check this and avoid creating tasks to sweep the empty ones.
I feel a bit bad about using the name 'needsSweep' as it's used for other things too, but it does describe the operation well (and I think we should change the other use as in bug 1373200).
Attachment #8877961 - Flags: review?(sphink)
Comment on attachment 8877961 [details] [diff] [review]
bug1372569-dont-sweep-empty-caches

Review of attachment 8877961 [details] [diff] [review]:
-----------------------------------------------------------------

I'm a stickler for names, but this name sounds fine to me, with or without renaming the other needsSweep.

Without renaming, they still refer to the same concept the way I think of it. If it's a whole table, then it's whether there's anything dead in it that needs to be swept out. If it's an aggregate or just an edge, it's pretty much the same thing.

With renaming, needsSweep still makes sense for possibly empty weak caches. I'll argue in the other bug about the other name.
Attachment #8877961 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/de7215f52f9b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: