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

Stop saving JSON files with indents #2921

Merged
merged 4 commits into from Aug 7, 2019
Merged

Stop saving JSON files with indents #2921

merged 4 commits into from Aug 7, 2019

Conversation

Drapersniper
Copy link
Contributor

@Drapersniper Drapersniper commented Aug 6, 2019

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Stop saving json files with 4 indents, this will significantly reduce file size and improve .set() performance for config saves when using the JSON driver

Signed-off-by: Draper <guyreis96@gmail.com>
@Drapersniper Drapersniper requested a review from tekulvw as a code owner Aug 6, 2019
Signed-off-by: Draper <guyreis96@gmail.com>
@Drapersniper Drapersniper requested a review from Twentysix26 as a code owner Aug 6, 2019
Copy link
Member

@Tobotimus Tobotimus left a comment

I think we can keep the indents for the instance config files (in backup functions / data manager). This file is usually tiny and is rarely written to. It's harmless to have it indented.

So the indents only need to be removed in red_json.py :)

Signed-off-by: Draper <guyreis96@gmail.com>
@Drapersniper
Copy link
Contributor Author

@Drapersniper Drapersniper commented Aug 6, 2019

Got too happy nuking indents xD reverted and only applied to the json driver 👍

changelog.d/2921.enhancement.rst Outdated Show resolved Hide resolved
@Drapersniper
Copy link
Contributor Author

@Drapersniper Drapersniper commented Aug 6, 2019

Done, still not 100% clear on how much detail should be added to change logs.

@Tobotimus
Copy link
Member

@Tobotimus Tobotimus commented Aug 6, 2019

@Drapersniper When writing changelogs, simply consider a user or a cog creator reading them. If they simply see "JSON files are now saved without indents", they might consider that annoying if they aren't aware of the space efficiency/performance gain :)

@Tobotimus Tobotimus merged commit 556af32 into Cog-Creators:V3/develop Aug 7, 2019
1 check passed
@mikeshardmind mikeshardmind added this to the 3.2.0 milestone Aug 13, 2019
@Drapersniper Drapersniper deleted the betterjsonstorage branch Aug 30, 2019
@Drapersniper Drapersniper mentioned this pull request Dec 22, 2019
3 tasks
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.

None yet

3 participants