You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As also noted in #2123 the stateless architecture can result in a lot of data that is being stored in the client. We find that network transfer of these states alone can be the culprit for sluggish applications when a request has to transmit 1 MB of state data... A redesign that avoids this data transfer is not always easily possible.
Describe the solution you'd like
It would be great, if the dcc.Store component had an option to automatically store the data compressed in the browser. The cost of compressing and decompressing on the server side is normally really low and the reduction in size is often huge. A limitation might be that client-side JavaScript would not easily be able to manipulate the data without decompressing it.
Describe alternatives you've considered
HTTP compression, but this is only addresses sending data from the server to the browser. Most browsers won't compress request bodies.
Manual compression/decompression, which works quite fine. Output compressed_data = zlib.compress(orjson.dumps(data, option=orjson.OPT_NON_STR_KEYS)).decode("latin1") to the store and decompress the input data = orjson.loads(zlib.decompress(compressed_data.encode("latin1"))).
The network transfer for all data (not only dcc.Store) can be significantly reduced now that the PR for #3924 has been merged.
While I think that it would be still useful to have this option, the implementation for this does not neatly fit into the current code base, because it would need to be implemented in the general callback code, while being a problem that should really be handled by code that is specific to dcc.Store.
I think it would be much better to have callback hooks as proposed by @BSd3v in #3471 and then this could be implemented using such a hook.
Activity
datenzauberai commentedon Aug 26, 2026
The network transfer for all data (not only dcc.Store) can be significantly reduced now that the PR for #3924 has been merged.
While I think that it would be still useful to have this option, the implementation for this does not neatly fit into the current code base, because it would need to be implemented in the general callback code, while being a problem that should really be handled by code that is specific to dcc.Store.
I think it would be much better to have callback hooks as proposed by @BSd3v in #3471 and then this could be implemented using such a hook.