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

Speed up init:stop #8022

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Speed up init:stop #8022

merged 2 commits into from
Jan 22, 2024

Conversation

michalmuskala
Copy link
Contributor

This speeds up the VM shutdown procedure by avoiding to unload code for init:stop/1, which is already done for init:stop/0 - both calls are equivalent and only differ in the final result code returned by VM.

Additionally, this amends some smaller points when unloading code - using -- instead of custom list difference implementation (which should be much faster since -- was optimised couple releases ago), and avoiding unloading the logger module as well when shutting down.

This speeds up the VM shutdown procedure by avoiding to unload code for `init:stop/1`, which is already done for `init:stop/0` - both calls are equivalent and only differ in the final result code returned by VM.
Additionally, this amends some smaller points when unloading code - using `--` instead of custom list difference implementation (which should be much faster since `--` was optimised couple releases ago), and avoiding unloading the logger module as well when shutting down.
Copy link
Contributor

github-actions bot commented Jan 15, 2024

CT Test Results

    3 files    140 suites   46m 2s ⏱️
1 576 tests 1 527 ✅ 49 💤 0 ❌
2 088 runs  2 020 ✅ 68 💤 0 ❌

Results for commit 871f381.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng self-assigned this Jan 19, 2024
@bjorng bjorng added the team:VM Assigned to OTP team VM label Jan 19, 2024
@bjorng bjorng added the testing currently being tested, tag is used by OTP internal CI label Jan 19, 2024
@bjorng
Copy link
Contributor

bjorng commented Jan 19, 2024

Thanks! Looks good to me. I have added a commit to your branch with the init module compiled. Added to our daily builds.

@bjorng bjorng merged commit 938c87f into erlang:master Jan 22, 2024
16 checks passed
@bjorng
Copy link
Contributor

bjorng commented Jan 22, 2024

Thanks for your pull request.

@michalmuskala michalmuskala deleted the patch-1 branch January 22, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants