-
Notifications
You must be signed in to change notification settings - Fork 220
Reduce the size of Zone
by deferring lookups
#6903
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
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
bced31e
to
b3c26a6
Compare
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 think reducing the size gets us anything; temporal_rs wants a usize here, and no lifetime.
Meeting minutes: #6902 (comment) |
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.
nice, good call on the parts
Alternative to #6902
This defers the lookups in
zones
,names
,rules
, andregions
from the constructor, only storing the index in theZone
struct.This will cost an additional lookup at the beginning of each zone operation, but these are fairly lookup-heavy already anyway. It also saves the lookups for name and region, which are probably only needed very rarely. In exchange, the size of
Zone
gets significantly decreased.Also adds a
RawZone
abstraction which can be GIGO converted to and fromZone
, with the invariant being that the sameZoneInfo64
instance is used throughout. Users like temporal can combine this with a staticLazyLock<ZoneInfo64>
to provide a safe wrapper with minimal size.