Optimize JS::GetScriptedCallerGlobal

RESOLVED FIXED in Firefox 49

Status

()

Core
JavaScript Engine
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla49
Points:
---

Firefox Tracking Flags

(firefox49 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8753748 [details] [diff] [review]
Patch

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 1

2 years ago
Comment on attachment 8753748 [details] [diff] [review]
Patch

Very nice
Attachment #8753748 - Flags: review?(luke) → review+

Comment 2

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/07921777e504
https://hg.mozilla.org/mozilla-central/rev/07921777e504
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.