-
Notifications
You must be signed in to change notification settings - Fork 326
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
Schedule initialization of JS context in a separate thread #5680
Conversation
Analysis of the new startup is available as comment in the original bug report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
Show resolved
Hide resolved
...ntime-language-epb/src/main/java/org/enso/interpreter/epb/runtime/GuardedTruffleContext.java
Show resolved
Hide resolved
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review.
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
Show resolved
Hide resolved
engine/runtime-language-epb/src/main/java/org/enso/interpreter/epb/EpbContext.java
Show resolved
Hide resolved
...ntime-language-epb/src/main/java/org/enso/interpreter/epb/runtime/GuardedTruffleContext.java
Show resolved
Hide resolved
Jaroslav Tulach reports a new STANDUP for the last Friday (2023-02-17): Progress: - Init JS context in a separate thread done: #5680
Next Day: Finish HostException handling |
Pull Request Description
Implements the #5643 idea. As soon as
MainModule
createsContext
for GraalVM execution, it schedules a background task to initialize JavaScript. The initialization finishes sooner than Enso compiler is ready to work, saving time when it is actually needed.Important Notes
Only modifies boot sequence of
MainModule
(used in the IDE) andVerifyJavaScriptIsAvailableTest
(to verify the "context passing logic" works OK between threads). Regular CLI execution remains unchanged for now assuming batch execution may not need JavaScript in all the cases and if it does the initialization speed isn't that critical.Checklist
Please include the following checklist in your PR:
Scala,
Java,
style guides.