-
Notifications
You must be signed in to change notification settings - Fork 85
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
JAVASCRIPTCORE_ENABLED compiling fails #486
Comments
@ekegulskiy, this feature hasn't been tested for a while, so it can be broken ( |
Hi Volodymyr, thanks for quick response. Just to explain, I am running react-native-desktop on embedded Linux device and am looking for ways to improve performance. In the current architecture, the JS execution happens in a separate process (nodejs) and is probably affecting performance. Using JAVASCRIPTCORE_ENABLED feature would move the JS execution to the QT rendering process and should improve rendering performance (e.g. animations or key response time). Is my understanding correct? If you think it would be useful, I would love to contribute and help fix this feature, with some guidance/suggestions from you - please let me know. (BTW, is there a known changelist where the feature used to work?) Thank you for your time, |
Could you please try this PR? #450 Btw, I would be really glad to hear more about your project. So far I know only about usage of |
Thanks Volodymyr. I am working with the embedded device that is used to run HTML apps and play video. For running HTML apps, I am using webkit and want to explore other options that may give better performance. So, I was hoping that react-native-desktop would allow for more performant applications on embedded device (i.e. smoother animations, smaller footprint). Thanks for sharing the PR, how do I build it? Do I still use -DJAVASCRIPTCORE_ENABLED=ON for the cmake command, or some other define? |
You don't need to do special building of that PR. You can use it instead current version of
|
Thanks, I was able to run it on Ubuntu now. (BTW, just changing the desktop/main.cpp did not work - the d->jsExecutor variable was still set to "NodeJsExecutor" in Bridge::setupExecutor() function. Only after I changed the rootview.cpp to initialize jsExecutor to "JSWebEngineExecutor", it worked) However, the option to use QTWebEngine is problematic for the embedded device because of large QTWebEngine size. On my device I already have WPE webkit engine with the JavaScriptCore library available. Do you think it will be easy to write a new JS executor based on JavaScriptCore from webkit? In general, how is the JS execution is done on MacOS and Android? Does MacOS use JavaScriptCore available as part of Safari browser? (sorry to post generic questions here, is there a forum where I can ask generic questions?) |
To be honest, I don't know is it easy, because I didn't work with JavaScriptCore. Its test support was made by another developer who doesn't work on a project anymore.
On ios react-native uses JavaScriptCore engine provided by OS itself. In PR for macos it looks like javascriptcore taken from webkit repo and builds along with app. On mobile devices during debugging used chrome V8 engine. |
Environment
Ubuntu 18, latest code from https://github.com/status-im/react-native-desktop
Description
I tried to enable JavaScriptCore feature with the following steps:
The 'make' command error-ed out failing to download webkit project needed for JavaScriptCore_ep. I was able to bypass this issue by fixing the GIT_REPOSITORY variable in CMakeList.txt:
ExternalProject_Add(JavaScriptCore_ep **GIT_REPOSITORY https://github.com/WebKit/webkit.git** GIT_TAG 06fcd5bda23a9f4844263b60b33f2ad83be4d871 BUILD_BYPRODUCTS ${JavaScriptCore_STATIC_LIB} CONFIGURE_COMMAND ${JavaScriptCore_PREFIX}/Tools/Scripts/build-webkit --jsc-only --cmakeargs="-DENABLE_STATIC_JSC=ON -DUSE_THIN_ARCHIVES=OFF" BUILD_COMMAND "" INSTALL_COMMAND "" )
After this fix, it succeed to download and compile JSC library. However, the next step in the make process (building ReactCommon folder) has failed with many compile errors.
Is this feature supported in react-native-desktop project?
Thank you,
Eduard.
The text was updated successfully, but these errors were encountered: