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

export: Automatically minify JSON #1331

Closed
victorlin opened this issue Nov 2, 2023 · 3 comments
Closed

export: Automatically minify JSON #1331

victorlin opened this issue Nov 2, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@victorlin
Copy link
Member

victorlin commented Nov 2, 2023

proposed by @tsibley on Slack

Context

Currently, JSON minification is opt-in with the --minify-json option. However, it is not uncommon for large-scale analyses to have thousands of tips resulting in a dataset file that takes significantly more time to load compared to a minified version.

Related issues

Proposed solution

Make JSON minification the default behavior for anything >1000 tips (threshold used by @trvrb's example on Slack). This allows smaller JSONs (which don't gain much performance benefit with minification) to be in the indented, human-readable format.

@victorlin victorlin added the enhancement New feature or request label Nov 2, 2023
@corneliusroemer
Copy link
Member

I support minification by default. Should we offer an option for pretty printing or is that unnecessary as one can simply use jq '.' or similar to do so?

@tsibley
Copy link
Member

tsibley commented Nov 17, 2023

@corneliusroemer Yeah, that would be the (new) --no-minify-json option to disable minification (i.e. the current default behaviour). Discussed in the linked Slack thread, but not noted here.

@victorlin
Copy link
Member Author

Implemented in Augur version 24.0.0:

export v2: Automatically minify large outputs. Use --no-minify-json to disable this default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants