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

Optimize Scheduler #295

Merged
merged 6 commits into from Sep 13, 2023
Merged

Conversation

kevinthegreat1
Copy link
Collaborator

@kevinthegreat1 kevinthegreat1 commented Sep 12, 2023

A significant rewrite of Scheduler, providing performance increases. The new implementation is around twice as fast and uses slightly more than half of the original memory.

Refactor Scheduler and MessageScheduler to be singletons.
Add SchedulerTest.

Below are before and after benchmarks.

Original

CPU Time

Current CPU Time 1 Current CPU Time 2 Current CPU Time 3

Memory

Current Memory 1 Current Memory 2 Current Memory 3

New

CPU Time

HashMap CPU Time 1 HashMap CPU Time 2 HashMap CPU Time 3

Memory

HashMap Memory 1 HashMap Memory 2 HashMap Memory 3

Copy link
Member

@LifeIsAParadox LifeIsAParadox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result looks very good. Thanks for the optimization.

@kevinthegreat1 kevinthegreat1 merged commit eaca5ec into SkyblockerMod:master Sep 13, 2023
1 check passed
@kevinthegreat1 kevinthegreat1 deleted the scheduler branch September 13, 2023 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants