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

Disable all JIT #108

Merged
merged 1 commit into from Jun 3, 2019
Merged

Disable all JIT #108

merged 1 commit into from Jun 3, 2019

Conversation

Kudo
Copy link
Member

@Kudo Kudo commented May 31, 2019

Summary

As facebook/react-native#24261, the community report my experimented builds still have crashes.

  1. w/o DFG JIT
  2. w/ DFG JIT and fix __clear_cache issue.
  3. w/o DFG JIT and fix __clear_cache issue.
    (fix __clear_cache commit as here Kudo@daf5700)

And they did mention that the no_jit version is crash free.
I am going to propose turning off JIT totally to make sure at least we have a stable JSC.
Will re-enable JIT if community feedback for a lot performance dropping and will try for next major WebKitWPE major release.

Disable JIT brings two benefits:

  1. Binary size reducing about 1MB
  2. Memory save about 48%

Measurement

Measurement methodology is pretty much like what I did in #105
For memory profiling, it is to execute adb shell dumpsys meminfo com.javascriptcore.profiler and compare TOTAL memory usage right after sunspider, jetstream, octane2, sixspeed benchmarks.

Results

Npm Version Publish Date Config WebkitGTK Revision WebkitGTK Date TTI SunSpider Jetstream Hashmap Octane2 SixSpeed Render Flat Render Deep Size Memory
241213.1.0 2019-04-30 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
241213 2019-02-08 456 469 557 1569 416 436 347 7.6/10.0 162525
174650.0.2 - Stock RN58 (non-i18n) 174650 2014-10-13 454 568 4005 1996 1454 518 395 2.7 (with libicu_common.so) 169026
@kudo-ci/jsc-android@241213-no-dfg-jit 2019-05-17 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
DFG_JIT:false
241213 2018-09-21 451 534 3033 1780 420 510 430 6.3/8.0 146165
@kudo-ci/jsc-android@241213-no-jit 2019-05-17 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
DFG_JIT:false
JIT:false
241213 2018-09-21 456 1947 11799 5887 973 538 431 5.0/7.1 70385

https://docs.google.com/spreadsheets/d/1hqX3ai-NCpN_J6YQDTKnKNBctWnMFA6EyOdVhPvwUas/edit#gid=193471288

Screen Shot 2019-05-31 at 11 19 24 PM

Screen Shot 2019-05-31 at 11 19 31 PM

Screen Shot 2019-05-31 at 11 19 37 PM

@newyankeecodeshop
Copy link

According to your benchmarks, disabling JIT completely really destroys performance. Worse than the original JSC from 2014.
Maybe the answer is for folks that experience the crashing to switch to a different version of JSC, or a build without JIT? But disabling it for the entire community looks like it will cause major performance regressions.

@Kudo
Copy link
Member Author

Kudo commented May 31, 2019

I think that is for benchmark. For a normal RN app, the renderflat and renderdeep are more like real world use case.
Someone even said that no-jit JSC is faster than stock RN058.
My opinion is to disable JIT first and make sure it will not crash.
If a user really wants JIT, we could have another build variant like what we did for Intl version later. (And use with crash risk)

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this in and publish to NPM for other people to try

@kmagiera kmagiera merged commit 4399436 into react-native-community:master Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants