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

Remove type fallback from datagen #6115

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Feb 14, 2025

Falling back from the generic to the standard display name for the generic format in datagen means the standard display name will be included in both generic and specific data structs.

This introduces a second "generic standard" data struct that contains generic names that are actually standard. This data struct is used by both the generic and the specific format.

metazone/generic/names/long/v1, <total>, 614'187B, 596'865B, -> 324'780B, 309'490B
metazone/generic/standard/names/long/v1, <total>, 0B, 0B -> 290'413B, 273'641B
metazone/specific/names/long/v1, <total>, 1'342'950B, 1'325'847B, -> 996'922B, 977'516B
    
This means:
* generic format: 614'187B, 596'865B -> 615'193B, 598'421B
* specficic format: 1'342'950B, 1'325'847B -> 1'287'335B, 1'251'157B
* both formats: 1'957'137B, 1'922'712B -> 1'612'115B, 1'560'647B

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

A bit annoying that you need to check extra data structs to get the name you need, but the size win is compelling.

I can follow the fallback chain when it is illustrated.

Seems likely that bugs will arise with all this fallbacking; make sure it is well tested.

Comment on lines +167 to +169
MetazoneGenericStandardNamesLongV1,
"time_zone/generic_standard_long@1",
has_checksum
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: Maybe name it metazone/standard/names/long/v1 (on the same level as generic and standard)?

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.

2 participants