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

Add --data-from-json option for initialization of emulator data #9

Merged
merged 4 commits into from Apr 11, 2024

Conversation

ohaibbq
Copy link

@ohaibbq ohaibbq commented Apr 10, 2024

The JSON parser is exponentially faster than the YAML parser for large files

Copy link

@ethan-oro ethan-oro left a comment

Choose a reason for hiding this comment

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

looks amazing ✨

]
}
]
}

Choose a reason for hiding this comment

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

nit: newline

@@ -23,6 +23,7 @@ type option struct {
LogFormat server.LogFormat `description:"specify the log format (console/json)" long:"log-format" default:"console"`
Database string `description:"specify the database file if required. if not specified, it will be on memory" long:"database"`
DataFromYAML string `description:"specify the path to the YAML file that contains the initial data" long:"data-from-yaml"`
DataFromJSON string `description:"specify the path to the JSON file that contains the initial data (faster for large files)" long:"data-from-json"`

Choose a reason for hiding this comment

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

do you have a sense at what size, in general, you would recommend switching from yaml to json? could be helpful to have a general sense (either here or in a doc somewhere) to guide folks

Copy link
Author

Choose a reason for hiding this comment

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

updated the helpdoc to say "multi-megabyte"

Copy link

@ageiduschek ageiduschek left a comment

Choose a reason for hiding this comment

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

No comments outside of Ethan's!

@ohaibbq ohaibbq merged commit 70d2848 into candidate/rb20240328 Apr 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants