Closed Bug 1273828 Opened 8 years ago Closed 8 years ago

Optimize JS::GetScriptedCallerGlobal

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
The addEventListener micro-benchmark in bug 1273481 spends a lot of time under JS::GetScriptedCallerGlobal (called by GetIncumbentGlobal).

GetScriptedCallerGlobal is mainly slow when dealing with Ion inline frames. We can add a fast path that bypasses this, though: if the top activation has at least one non-self-hosted, non-inline frame, we can use activation->compartment->global.

This speeds up the addEventListener benchmark from ~2100 ms to ~1500 ms.
Attachment #8753748 - Flags: review?(luke)
Comment on attachment 8753748 [details] [diff] [review]
Patch

Very nice
Attachment #8753748 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/07921777e504
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: