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

Upgrade to magnus 0.7.x → Threads, JS daemon, and better scheduler control #299

Open
eliias opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request rust Pull requests that update Rust code

Comments

@eliias
Copy link
Owner

eliias commented Jul 1, 2024

The Magnus 0.7.0 release added support for Ruby Threads, Mutex, and Fibers. This is a good time to revisit our usage of the fork that supports releasing the GVL, and to upgrade it to work with 0.7.x. We currently use the fork to allow us to unblock the Rails process during the time we spend computing in v8/Rust. There is other a lot of bad code that allow us to interop between Ruby and v8, and this should be improved:

  1. It is currently unclear what the actual cost is to create a v8 “worker” every time we call a JS function.
  2. It would be nice to have a pre-warmed set of v8 threads/Ruby process (configurable), instead of one worker/process. This allows users to balance memory/performance trade-offs in a better way, and maybe enables some form of concurrency for function calls (maybe helpful for concurrent rendering of React apps in templates).
@eliias eliias added enhancement New feature or request dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jul 1, 2024
@eliias eliias self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant