-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ChakraRuntime swap back to native implementation for getPropertyNames #3527
Conversation
@@ -386,11 +376,28 @@ bool ChakraRuntime::isHostFunction(const facebook::jsi::Function &obj) const { | |||
} | |||
|
|||
facebook::jsi::Array ChakraRuntime::getPropertyNames(const facebook::jsi::Object &object) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getPropertyNames [](start = 36, length = 16)
Since we are temporarily reverting back to the implementation that (incorrectly) returns non-enumerable properties, we fail JsiRuntimeUnitTests.ObjectTest at line 158 in JsiRuntimeUnitTests.cpp. We should temporarily disable this test as well. You can do so be prefixing DISABLED_ to the test name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum It looks like the JSI unit tests are no longer being executed in our CI loop. I'll follow up on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @stecrain! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 60 minutes, a condition that will be fulfilled in about 35 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
getPropertyNames was refactored to take advantage of javascript so that all property names up the prototype chain (this matches the hermes behavior).
When looking into page nav performance in the app I am working on I noticed getPropertyNames was showing up as much more expensive than in the past, also quite a bit more recycler thread activity.
With the JS implementation of getPropertyNames the duration from by button press to xaml beginning layout is 2.2 seconds.
Swapping back to a native implementation reduced the time from button press to xaml layout to 1 second, as overall gain of 1.2 seconds for the scenario.
CPU samples in getPropertyNames dropped from 615 to 25
Microsoft Reviewers: Open in CodeFlow