Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regressions in Chrome Beta (74) #942

Closed
bd82 opened this issue Apr 9, 2019 · 2 comments
Closed

Performance regressions in Chrome Beta (74) #942

bd82 opened this issue Apr 9, 2019 · 2 comments
Labels

Comments

@bd82
Copy link
Member

bd82 commented Apr 9, 2019

No description provided.

@bd82
Copy link
Member Author

bd82 commented Apr 11, 2019

Commented on the previous chromium issue here:
https://bugs.chromium.org/p/v8/issues/detail?id=7952

@bd82
Copy link
Member Author

bd82 commented Apr 12, 2019

It seems that the heuristics for "fast properties" in V8 have changed recently causing the Chevrotain parsing rules:

 RULE("Array", () => {/* ... */})

Which are saved as properties on the Parser instance to no longer be optimized.

One possible "fix" for this was to save these rules on the prototype of each Parser.

This however could have been problematic because Chevrotain Parsing rules may have references
to a specific class instance (e.g const $ = this) so saving them on the prototype could cause unexpected errors.

An alternative solution was to "trick" V8 into thinking that the Parser instance is a prototype and thus
ensure fast properties and optimizations are used.
fb714a7

@bd82 bd82 added the Bug 🪲 label Apr 12, 2019
@bd82 bd82 changed the title Investigate Performance regressions in Chrome Beta (74) and Chrome Canary (75) Performance regressions in Chrome Beta (74) and Chrome Canary (75) Apr 12, 2019
@bd82 bd82 changed the title Performance regressions in Chrome Beta (74) and Chrome Canary (75) Performance regressions in Chrome Beta (74) Apr 12, 2019
@bd82 bd82 closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant