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

Ignore default values and compress json length as much as possible #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ghost-chu
Copy link
Contributor

@Ghost-chu Ghost-chu commented Feb 19, 2024

This PR compresses JSON size by:

  • Specifying SerializedName to shorten the serialized field name
  • Use block_id to serialize Material fields, integer is much shorter in most cases
  • Stop serialization of field defaults (e.g. isAdult = true, slot = -1) with custom TypeAdapter

This PR saves about 60% of storage space on the production server over 60% storage usage on data_extra table.

Status Proof
Old old
New new

Copy link
Contributor Author

@Ghost-chu Ghost-chu left a comment

Choose a reason for hiding this comment

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

Self-Review completed. Looks good.

@Ghost-chu Ghost-chu marked this pull request as ready for review February 19, 2024 01:51
@Ghost-chu Ghost-chu marked this pull request as draft February 20, 2024 15:38
@Ghost-chu
Copy link
Contributor Author

Issues with connections running out and causing queue backlogs have been noted in production environments and are being rechecked PR

@Rothes
Copy link
Contributor

Rothes commented Feb 20, 2024

Issues with connections running out and causing queue backlogs have been noted in production environments and are being rechecked PR

It has been an issue before the changes. Especially on my fork I enabled hoppers by default on last release.

@Ghost-chu Ghost-chu marked this pull request as ready for review February 20, 2024 16:14
@Ghost-chu
Copy link
Contributor Author

Issues with connections running out and causing queue backlogs have been noted in production environments and are being rechecked PR

It has been an issue before the changes. Especially on my fork I enabled hoppers by default on last release.

Agree, I think this is a CN fork issue, I checked PR again and it should not cause connection pool run out, reopened

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