Comments (7)
from hermes-windows.
From your steps, you mentioned opening the RNW developer menu. Are you running a debug build of your application?
Chakra exposes it's APIs to react-native-windows in the form of ABI-safe C functions. It lets RNW debug builds use a release version of Chakra. The Hermes boundary is not yet ABI safe, and MSVC has different debug snd release ABIs. This currently forces RNW to use an "optimized debug build" of Hermes, which performs worse than its release optimized build.
This constraint go away I think, with work to move JS engine interface to be ABI safe. But right now Hermes direct debugging, like web debugging, is not representative of release build performance. Debug-time developer experience is still super important though. Did switching to Hermes direct debugging degrade that for your app?
from hermes-windows.
Also from your steps you are not comparing Chakra vs Hermes at all. When you enable remote debugging, you are running the JS inside a webbrowser (either Edge or Chrome probably) - both of which use V8. When running the JS in a browser you are running inside a very different JS environment including a completely different promise implementation. There are so many differences between how things run in "Remote Debugging" env, that it should not be used for any kind of performance testing.
from hermes-windows.
From your steps, you mentioned opening the RNW developer menu. Are you running a debug build of your application?
Chakra exposes it's APIs to react-native-windows in the form of ABI-safe C functions. It lets RNW debug builds use a release version of Chakra. The Hermes boundary is not yet ABI safe, and MSVC has different debug snd release ABIs. This currently forces RNW to use an "optimized debug build" of Hermes, which performs worse than its release optimized build.
This constraint go away I think, with work to move JS engine interface to be ABI safe. But right now Hermes direct debugging, like web debugging, is not representative of release build performance. Debug-time developer experience is still super important though. Did switching to Hermes direct debugging degrade that for your app?
Yes, all tests were performed with a Debug
build initially and were essentially live switched using the developer menu.
For our actual application, which my test repository is imitating, we do indeed have about a 20 second load screen time which is similar to the 10K Nested Promise test in the referenced repository.
I have gone back and rebuilt and tested in a Release
build. The performance of Hermes in Release was still worse than webdebugging. It's still about 8 seconds for a nested 10K promise test. The others are under 1 second but still have the worst performance. I have updated the application to alert with the measure and have updated the spreadsheet with the data.
hermes-promise-test.xlsx
from hermes-windows.
Also from your steps you are not comparing Chakra vs Hermes at all. When you enable remote debugging, you are running the JS inside a webbrowser (either Edge or Chrome probably) - both of which use V8. When running the JS in a browser you are running inside a very different JS environment including a completely different promise implementation. There are so many differences between how things run in "Remote Debugging" env, that it should not be used for any kind of performance testing.
I can go ahead and provide you with updated results from Chakra in release for the repository in question.
from hermes-windows.
I have tested Chakra with both Debug and Release. Results are as follows:
For Debug, Hermes takes 3.5 to 19 times longer than Chakra.
For Release, Hermes takes 2.5 to 7.7 times longer than Chakra.
Important to note; for the larger Nested Promise tests, Chakra Debug outperforms Hermes in Release.
hermes-promise-test.xlsx
from hermes-windows.
@AlexLablaiksSAP I am reopening the issue.
As we discussed with your team today, I clearly see the same issue playing with your repro.
From what I see in the WPA (Windows Perf Analysis tooling), where are no significant delays in the JS thread. The most of time is spent inside of the Hermes interpreter. The function that seems to be the most expensive is the Array.indexOf()
.
The next steps:
- Discuss this issue with Meta's Hermes team
- I would like to see the Hermes CPU sampling profiler results. I need to use the latest Hermes bit for it.
from hermes-windows.
Related Issues (20)
- Add Source Link to Hermes PDB Files
- Add DateTimeFormat::formatToParts
- Add Intl::Collator
- Add Intl::NumberFormat
- Add Intl toLocaleLowerCase and toLocaleUpperCase
- Support Intl bestFit matching
- Add order to DateTimeFormat::resolvedOptions
- Hermes as the RNW Default Engine
- I hope Static Hermes supported Windows, Linux, and MacOS.
- Hermes Engine takes at least 2x more time to resolve promises.all than Chakra HOT 1
- URLSearchParams missing functionality
- objectGetOwnPropertyNames() - Bundle fails to load from Debug app via release/checkediterdebugger/hermes.dll HOT 1
- hermes.dll is not compatible with PkgESSecComp@10 (CfgChk + CheckCFlags2) analysis HOT 1
- Add JSI Tests in repo HOT 3
- Add Intl API Support for Hermes JS Engine HOT 1
- jsi::String::utf8 does not preserve embedded NULs in Debug mode HOT 3
- Fix BinSkim errors HOT 4
- Hermes repeatable builds for NuGet packages HOT 1
- Add MIT Licensing Information to nuget Package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermes-windows.