-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 deopts diff
#193
Comments
@marklundin Is there a specific demo or repro you are seeing the de-opt in? Diff accepts a lot of different inputs, which means it tends to ride on the limits of V8's IC size, so I imagine there are some cases where that function switches from being polymorphic to megamorphic, depending on how Preact is used. I'm not seeing a de-opt in dbmonster, but perhaps that demo is not stress-testing varied Interesting little factoid while you're digging around - one of the reasons Thanks for the extra eyes on performance, by the way! :) |
Great answer, and you're right about dbmonster. I'm not seeing any deopts either. I suspect thats because as you said the inputs are near identical across calls. I'll try and run it through IRHydra to see if it throws up anything. |
IRHydra is awesome, been using it to optimize for a few months. There are 2 or 3 functions in Preact that still hard de-opt, it'd be great to have another set of eyes looking for reasons. |
@marklundin Big thanks for pointing this out - I tried to strip back the use of deeply nested (dom) objects in some of the diff methods in 32c8aca and I think it should address that de-opt. What should we do with this issue? I like to have performance visibility, but I don't have anything on hand that I can try to further optimize |
This looks great, V8 is no longer bailing out of the diff. I think it's safe to close this off but agree it would be great to keep an eye on these types of things |
Great! 🎉 |
Useful to know but It seems V8 tries to optimise the diff function, but bails out with the 'Optimized too many times' reason. You can test this by running the profiler in Chrome and checking the Timeline.
Not sure what the cause of this could be, but I might do a little more digging. Would be great to open this up to the optimising compiler :)
The text was updated successfully, but these errors were encountered: