Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feature Request] Option to compress request payload in a callback

オープン
#3,924 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

まず、callback リクエストの処理と、提案されているアプローチを確認するために参照されている PR #3925 を読みます。完了条件は、callback で gzip 圧縮を選択でき、指定された payload サイズのしきい値を適用し、デフォルトの非圧縮動作を維持できることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement P3 size: 3

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

主要言語
Python
スター
24.4k
フォーク
2.3k
平均マージ
1日 21時間
マージ済み PR(30日)
19

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/dash のほかの issue

plotly/dash の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。