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

Rewrite scheduler and make it smol #165

Merged
merged 17 commits into from
Mar 11, 2024
Merged

Rewrite scheduler and make it smol #165

merged 17 commits into from
Mar 11, 2024

Conversation

filiptibell
Copy link
Collaborator

This PR implements the new mlua-luau-scheduler in Lune. This required some pretty substantial changes in the net builtin but in other places most of the changes are migrating to new APIs and replacing 'static lifetime bounds with plain 'lua ones. Here are the main benefits for any curious reader:

  • Minimal overhead for lua threads, rust futures, and their interop. Now lock-free and up to 4x or better performance in very lua-thread-heavy workloads
  • Rewritten net.serve implementation out of necessity, now also lock-free. Some performance improvements for net.socket and for NetWebSocket objects in general
  • Many bug fixes (see below)
  • Improved incremental compile times since the scheduler is now a separate crate. This may also help Lune break out builtins into smaller, separate crates in the future.
  • We no longer leak memory of the Lua struct to get rid of lifetime issues

Fixes #130
Fixes #114
Fixes #112

Partially sets up for #92 and #75

@filiptibell filiptibell merged commit cd34dcb into main Mar 11, 2024
8 of 10 checks passed
@filiptibell filiptibell deleted the smol-scheduler branch March 11, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant