Open Bug 517385 Opened 15 years ago Updated 2 years ago

JS_CompileUCFunctionForPrincipals takes up a 15% of time for event dispatch

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

Details

Attachments

(2 files)

Not sure how much of a problem this is for non-synthetic cases; the testcase I'm looking at fires events just once per node... One thing that might help that particular testcase is something like our eval cache that will just return the function for that string without compiling. Is that feasible? Can we gather data on whether it would be worth it?
How much faster is eval comparing to "real" compilation+execution when the code is called only once? We could call the eval few times, and compile only after that.
Attached file a testcase (deleted) —
A bit ugly testcase, but focusing event dispatching in Shark shows where the time is spent.
I'm not convinced this is even a bug. We could memoize here. But, you know, we could memoize just about anything.
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: