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

Improve getHoliday caching and improve ops/s #474

Merged
merged 4 commits into from
Mar 4, 2024
Merged

Conversation

derTobsch
Copy link
Contributor

@derTobsch derTobsch commented Feb 29, 2024

closes #460

With the cache mechanism moved from the isHoliday(..) method to the basic method getHoliday(..) that is also used by isHoliday(..). We will get an nice performance boost from 44437.257 ops/s

Benchmark                                                    Mode  Cnt      Score     Error  Units
HolidayManagerGetHolidayBenchmarkTest.benchmarkGetHolidays  thrpt   15  44437.257 ± 665.105  ops/s

see https://github.com/focus-shift/jollyday/pull/474/checks

up to 23832222.693 ops/s

Benchmark                                                    Mode  Cnt         Score        Error  Units
HolidayManagerGetHolidayBenchmarkTest.benchmarkGetHolidays  thrpt   15  23832222.693 ± 870646.268  ops/s

see https://github.com/focus-shift/jollyday/actions/runs/8111314784/job/22170341131

That means an improvement of (23832222 - 44437) / 44437 * 100 = 53531 %

@derTobsch derTobsch changed the base branch from main to benchmark February 29, 2024 16:46
@derTobsch derTobsch force-pushed the benchmark branch 4 times, most recently from 9f23960 to 358796f Compare March 1, 2024 12:12
Base automatically changed from benchmark to main March 1, 2024 12:25
@derTobsch derTobsch force-pushed the improve-caching branch 4 times, most recently from 485c0a6 to fe0dc66 Compare March 1, 2024 15:28
@derTobsch derTobsch added this to the 0.27.0 milestone Mar 1, 2024
@derTobsch derTobsch marked this pull request as ready for review March 2, 2024 15:25
Copy link

sonarqubecloud bot commented Mar 2, 2024

@derTobsch derTobsch changed the title Improve caching Improve getHoliday caching and improve ops/s Mar 4, 2024
@derTobsch derTobsch merged commit a563e03 into main Mar 4, 2024
11 checks passed
@derTobsch derTobsch deleted the improve-caching branch March 4, 2024 12:29
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.

Caching "getHolidays"
1 participant