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

Change FsDataProvider to put data marker attributes in the same file #5784

Open
sffc opened this issue Nov 6, 2024 · 4 comments
Open

Change FsDataProvider to put data marker attributes in the same file #5784

sffc opened this issue Nov 6, 2024 · 4 comments
Labels
C-datetime Component: datetime, calendars, time zones

Comments

@sffc
Copy link
Member

sffc commented Nov 6, 2024

In order to reduce the number of JSON files, it might make sense for the FsDataProvider to merge marker attributes into the locale files.

So, instead of this:

  • foo@1/attr1/en.json: "hello"
  • foo@1/attr2/en.json: "world"

we could have foo@1/en.json with the following content:

{
    "attr1": "hello",
    "attr2": "world"
}

CC @Manishearth

@sffc sffc added the C-datetime Component: datetime, calendars, time zones label Nov 6, 2024
@robertbastian
Copy link
Member

Or one big file for everything 😃.

I don't really want to make changes to FS-JSON only. This doesn't seem compatible with FS-postcard.

@sffc
Copy link
Member Author

sffc commented Nov 6, 2024

Well I guess the way this works is that FsDataProvider would serialize a ZeroMap<str, DataStruct> which I think should work with postcard.

@sffc
Copy link
Member Author

sffc commented Nov 6, 2024

It does make postcard (and JSON) less efficient since a load operation needs to parse out the whole file. Hmm.

@Manishearth
Copy link
Member

I think FS should just support both, selectable at datagen time, leading to .multi.json files (or whatever). We use the multi thing for JSON, where the goal is primarily human readability. We use individual ones for postcard where we actually want the slicing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-datetime Component: datetime, calendars, time zones
Projects
None yet
Development

No branches or pull requests

3 participants