-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
multi-threaded compression and dictionary #4189
Comments
Dictionaries can be shared between threads. |
Thanks for the info @Cyan4973 . I have not benchmarked how long it is taking for compression context and decompression context initialization. But assuming it's an overhead on top of every request ? Is it possible to make it as a static variable to be leveraged across multiple threads ? |
A compression context can be re-employed, Re-using a context is generally good for speed and reduced memory pressure. |
Sure @Cyan4973 ...So i have to live with it is it ? Because my app is a multi threaded scenario. Thank you for your prompt responses |
Ensure that each thread has its own compression context. Then they can work in parallel, sharing the same dictionary. |
Sure @Cyan4973 ...Thank you... Are there any plans in future to even make this context shareable across threads because it saves lot of time along with storage ? |
Is your feature request related to a problem? Please describe.
We have an application which is multi threaded and are planning to compress using a digested dictionary. When i used the same ctx for compression, intermittently i am getting Access violation reading location. Then after changing it to non-static, the issue subsided as mentioned in the manual ?
Describe the solution you'd like
Can we make it 1 time init and use it across threads ? This saves init time/thread ?
Describe alternatives you've considered
NA
Additional context
NA
The text was updated successfully, but these errors were encountered: