react-native-v8
react-native-v8 copied to clipboard
feature request: support bytecode bundles
Hi, @Kudo!
First of all, thank you for your hard and useful work.
I was wondering if there is a way to make your V8 fork of RN generate and consume bytecode bundles instead of parsing plain JS text bundles, to speed up cold launch time?
If there is one, I'm sorry for asking something obvious, but could you point to an example of how to set this up?
I have on my mind things like bytenode, v8-compile-cache and code caching article. However, I'm not deep into this subject, but I hope I managed to convey what I mean.
For bytecode caching, should find a chance to call V8's CreateCodeCache()
to generate the cache and load the CacheData accordingly.
For V8 snapshot (which may like the bytecode bundle), my thought is about to use V8's mksnapshot to convert plain JS text into native bytecode format. However, it may need to modify more RN internal code. This is in my plan and will have a time to do this experiment.
Hey @Kudo, cold start time is a big concern for us right now, is there any way we can help move this issue along? Even if we could just run an experiment/benchmark to see if bytecode caching is worth implementing into react-native-v8
.
1+ for this