[Feature Request] Option to compress request payload in a callback
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- backend-api-design
Rechercherichtung
Lies zunächst die Verarbeitung von Callback-Anfragen und den referenzierten PR #3925, um den vorgeschlagenen Ansatz zu verstehen. Erledigt ist die Aufgabe, wenn Callbacks die gzip-Komprimierung aktivieren können, den angegebenen Schwellenwert für die Payload-Größe anwenden und das standardmäßige unkomprimierte Verhalten beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
While the payload of the HTTP response bodies can be compressed in case of transmitting large amounts of data from the server side to the client, this is not possible for the actual HTTP request body of a callback that sends this data to the server side.
Grids are notoriously using huge JSON structures of several megabytes. Transmitting this data via the network can make the application feel sluggish.
Solution
We could have an option to compress the body of a server side callback on the client side. We could introduce two new parameters for the callback:
compress_payload: bool = False: If True, the callback request payload will be compressed using gzip compression before being sent to the server. Defaults to False.
compress_threshold: int = 5_000: The size threshold in bytes above which the payload will be compressed when compress_payload is True. Set to 0 to always compress regardless of size. Defaults to 5,000 bytes (5 kB).
Alternatives
This can partially be simulated by using client-side callbacks that compress and copy the data to a compressed dcc.Store and then rewire the callbacks to use that store and decompress on the server side. However, this bloats the code and application state.
See referenced PR for more details: https://github.com/plotly/dash/pull/3925
- Vorherrschende Sprache
- Python
- Sterne
- 24.4k
- Forks
- 2.3k
- Ø Merge
- 2 T. 14 Std.
- Gemergte PRs (30 T.)
- 23
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/dash
-
P2 plotly-internal size: 1 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Extract graph schema validation into properly named testEvtl. vergeben @Nice6042 hat das vor 57 Tagen übernommen. Offengood first issue P3 size: 1 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
plotly/dash#3735 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[BUG] dcc.Dropdown: hidden focus-target input is focusable inside aria-hidden and can overflow its wrapperEvtl. vergeben @KoolADE85 hat das vor 5 Tagen übernommen. Offenbug P2 size: 1
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 56/100
plotly/dash#4042 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
P3 plotly-internal size: 10+ task
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
plotly/dash#4040 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Drop Python 3.9 SupportOffenP2 plotly-internal size: 5 task
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
plotly/dash#4038 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
Ähnliche Issues
-
python-version
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug javascript P2-medium python release:v3.1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
adrirubio/claude-deck#546 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: desktop area: website priority: P2 type: feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
appandflow/stim#3411 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
baptistehamon/lsapy#185 ·
Maintainer antworten meist innerhalb von 1 Tag