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

V8 perf: selection_call getting deoptimized #3532

Closed
bhousel opened this issue Oct 30, 2016 · 2 comments
Closed

V8 perf: selection_call getting deoptimized #3532

bhousel opened this issue Oct 30, 2016 · 2 comments
Labels
bluesky Bluesky issues are extra challenging - this might take a while or be impossible performance Optimizing for speed and efficiency

Comments

@bhousel
Copy link
Member

bhousel commented Oct 30, 2016

Profiling turns up a lot of deopts in our render code:

screenshot 2016-10-29 22 36 10

These all have the reason listed as "Not optimized: Bad value context for arguments value"
Details here

I think what that means is that if we are going to use selection.call to call functions, all those functions should not have properties attached to them (or should have the same properties).

i.e. It's ok to selection.call(drawVertices, ...) but once we throw in something like selection.call(drawVertices.drawHover, ...) , the call sites are no longer monomorphic and all of our selection.call get deoptimized.

@bhousel bhousel added the performance Optimizing for speed and efficiency label Oct 30, 2016
@bhousel
Copy link
Member Author

bhousel commented Oct 30, 2016

Worth mentioning here that this might not be fixable.

All of our behaviors use the pattern selection.call(behavior) and selection.call(behavior.off). So that would need to change.

Also I haven't dug into it, but wouldn't surprise me if this pattern is common elsewhere in the d3 internals, and whether a single instance of this kind of call deopts all the selection.calls.

@bhousel bhousel added the bluesky Bluesky issues are extra challenging - this might take a while or be impossible label Mar 3, 2018
@bhousel
Copy link
Member Author

bhousel commented Jan 10, 2019

stale

@bhousel bhousel closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bluesky Bluesky issues are extra challenging - this might take a while or be impossible performance Optimizing for speed and efficiency
Projects
None yet
Development

No branches or pull requests

1 participant