Closed Bug 1622854 Opened 5 years ago Closed 5 years ago

Use mozilla::HashMap for the JS holder map

Categories

(Core :: XPCOM, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(2 files)

The comments in mfbt/HashTable.h say this is a lot faster than PLDHashTable so we should probably use it for the JS holders map.

This is in preparation for hopefully figuring out how we can split up the JS holders by zone.

I think we improved that situation. Nathan, is that right?

Flags: needinfo?(nfroyd)

(In reply to Eric Rahm [:erahm] from comment #1)

I think we improved that situation. Nathan, is that right?

We improved the situation as far as memory usage is concerned, but mozilla::HashMap is almost certainly going to be faster because it (potentially) inlines everything due to being template-based. Maybe LTO + PGO winds up doing some sort of code-splitting + inlining across the calls-through-function-pointers that PLDHashTable requires, I dunno.

Flags: needinfo?(nfroyd)

Okay well from a fission memshrink point of view lets not blow up memory usage.

Depends on D67017

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4da09b513bb1 Factor out the JS holder map into a separate class r=mccr8 https://hg.mozilla.org/integration/autoland/rev/15d4e5e5fd14 Switch JSHolderMap to use HashMap r=mccr8
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: