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

Try to Pool / re use compressors where possible. Fixes #2788 #2792

Merged
merged 10 commits into from
Sep 28, 2022

Conversation

abaranec
Copy link
Contributor

@abaranec abaranec commented Sep 1, 2022

No description provided.

@devinrsmith devinrsmith mentioned this pull request Sep 3, 2022
@abaranec abaranec marked this pull request as draft September 7, 2022 02:11
@abaranec abaranec marked this pull request as ready for review September 7, 2022 03:02
@niloc132 niloc132 mentioned this pull request Sep 27, 2022
3 tasks
Copy link
Member

@niloc132 niloc132 left a comment

Choose a reason for hiding this comment

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

Looks good. Filed a follow-up issue #2920 for myself, unless you want to handle any of these points in this patch.

  • Disable/fix meaningless "Got brand-new [de]compressor" messages. zstd, lzo, and gzip end up logging multiple times when decompressing each table, and zstd and gzip also multiple times when compressing.
  • Once we find that we can't ask the pool for a compressor, quit asking. This will somewhat mitigate the above, but also keeps us from doing the extra work of asking the pool for an instance we know we can't find (which itself requires taking the lock, etc). Specifically, if innerCompressor is null and the compress method ends up calling compressionCodec.createOutputStream(os), we should keep track of that fact. This will specifically protect the zstd and gzip codecs from having to rediscover this for each page within each column, as well as for the dictionary for each column.
  • For x86, investigate providing the native codec, which will enable the gzip codec not worry about the above case and pool its de/compressors.

@abaranec abaranec merged commit eb1108d into deephaven:main Sep 28, 2022
@abaranec abaranec deleted the abaranec_fixencoder branch September 28, 2022 14:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ColumnWriterImpl exacerbates bad behavior of SnappyCompressor
2 participants