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

[Java] use varint for class id encoding to reduce space cost #945

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Oct 5, 2023

What do these changes do?

This PR use varint for class id encoding to reduce java class writing space cost.

Before this PR, class id will be written as 3 bytes:

| flag byte | two bytes short class id|

With this PR, class id will be written as 1~3 bytes, and for most common used jdk types such as String, class id will be written using 1 bytes, which is much more efficient.

Related issue number

Closes #944

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

@chaokunyang chaokunyang changed the title [Java] use varint for class id read/write [Java] use varint for class id encoding to reduce space cost Oct 5, 2023
@chaokunyang chaokunyang merged commit 4b135c5 into apache:main Oct 5, 2023
11 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
Development

Successfully merging this pull request may close these issues.

[Java] use varint for class id to reduce space cost
1 participant