-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Feat/add server side compression support #3456
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
base: dev
Are you sure you want to change the base?
Feat/add server side compression support #3456
Conversation
…arg in the callback method and function
…case, the should_compress function will return true without a jsondumps check
…in the app.CallBack decorator
@caue-paiva thanks very much for the PR - I'll ask @T4rk1n to look it over when he gets a chance, but it may be a week or more before he can make time to evaluate it. |
Hello, could any of the reviewers take a look at this? I think the visual test is flaky |
Yes the percy tests are flaky, no worry as long as the tests pass it's really just to look at them if it's expected some change from the frontend code. |
For motivation see the following issue: #3452
Solution Overview: Server-Side Compression
This implementation provides a server-side only compression solution for dcc.Store components. The compression and decompression occur entirely on the server during callback execution, with the following key characteristics:
Important Note: This is explicitly a server-side solution. The client-side JavaScript cannot access or manipulate the compressed data - it only receives the final decompressed JSON payload.
Implementation Details
New Components Added
get_compression_manager_from_kwargs()
for parameter extractionCore Functionality
Integration with Callback System
The compression manager integrates seamlessly into the existing callback architecture:
CompressionManager
parameter to callback decoratorsUsage Example
Summary
This feature provides a server-side compression solution for dcc.Store components that:
The implementation successfully addresses the performance bottlenecks identified in the original issue while maintaining the simplicity and reliability expected from the Dash framework.
Contributor Checklist
optionals
CHANGELOG.md