node.js - JavaFX : How to process a webview in a non application thread -
i have javafx application contains webview among other javafx views in same window. webview opens url nodejs webapp consumes lot of cpu resources.
with resource consumption webview, other javafx views working slowly.
for our application, have powerful system 12 virtual threads in processor.
so, need deport webview processing thread won't affect behavior of other javafx views. there way achieve this?
you cannot this. javafx has single application thread per jvm process (java invocation) , webview api calls must processed on javafx application thread.
note internally, webview uses webkit may have own threading implementation support html5 stuff web workers, hidden when programming webview @ java api level. won't make of difference unless explicitly program javascript make use of it. guess if nodejs webapp optimized other browsers work fine in webview, need benchmark, guess did , found wanting. may want expend effort optimizing nodejs webapp have.
the way achieve similar requesting in question launch separate process, i.e., new javafx application in new jvm process, contains webview instance.
Comments
Post a Comment