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

feat(java): support meta compression by Deflater #1663

Merged
merged 9 commits into from
Jun 1, 2024

Conversation

chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented May 30, 2024

What does this PR do?

This PR support meta compression and add Deflater as default compressor.

In our test, it can compress meta by reduce size of 243 without introducing any performance cost:

before:
Fury | STRUCT | false | array | 1227 |

after
STRUCT | false | array | 984 |

Related issues

#1660

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@chaokunyang chaokunyang requested a review from LiangliangSui May 30, 2024 11:08
}
byte[] compressed =
classResolver
.getFury()
Copy link
Contributor

Choose a reason for hiding this comment

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

I had an idea when I was looking at the code recently.

Could org.apache.fury.config.Config be set to org.apache.fury.resolver.SerializationContext?
I think it is more reasonable to get Config from SerializationContext during runtime. It feels a bit weird to get it from Fury object.

This will reduce the burden on the Fury class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestion, I like the idea to get config from context. But other get context, user must get fury first, then get config from context. It will introduce an extra indirection

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's not related to this PR, we can discuss it in another issue

Copy link
Contributor

@LiangliangSui LiangliangSui left a comment

Choose a reason for hiding this comment

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

LGTM

@chaokunyang chaokunyang merged commit da5f847 into apache:main Jun 1, 2024
32 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.

2 participants