-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: Only initialize BusinessCalendar caches when data is accessed and improve caching performance #5378
Conversation
… improving caching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any specific comments on the code. I was unable to break things when testing this locally. I tested against docs CI, and ran my own tests locally with no issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see #5378 (comment)
engine/time/src/main/java/io/deephaven/time/calendar/CalendarDay.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/CalendarDay.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/Calendar.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some trivial comments.
engine/time/src/main/java/io/deephaven/time/calendar/ImmutableConcurrentCache.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/ImmutableConcurrentCache.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/ImmutableConcurrentCache.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java
Outdated
Show resolved
Hide resolved
engine/time/src/main/java/io/deephaven/time/calendar/ReadOptimizedConcurrentCache.java
Outdated
Show resolved
Hide resolved
Minimizing the lifetime of recomputed values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed enough, has great test coverage.
Makes BusinessCalendar caches populate only when accessed to avoid slow worker initialization. Additionally, caching in various operations has been improved to yield better performance.
Resolves #5377
Benchmark:
Performance:
Note1:
v0.33.0
times do not include initialization times, but the new values do.Note2: There appears to be contention or initialization overhead in the partitioned table case yielding slightly worse performance.