matplotlib / matplotlib/ipympl
Optimizations
オープン
まだ誰も着手していません。
- 主要言語
- Jupyter Notebook
- スター
- 1.7k
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I feel like there could be some optimizations concerning the image update.
- We should draw binary data directly on the canvas using:
context.putImageData(binary_data);
instead of creating a Blob that is png encoded. That would also allow the back-end to not waste time encoding into png (if that is possible).
- I feel like the "diff" computation should actually be slower than sending the full image, as it needs an extra computation of "which pixels actually needs a redraw?": https://github.com/matplotlib/matplotlib/blob/5fc44eea64a57ab1c6d236cf7c71906c9d40e6f6/lib/matplotlib/backends/backend_webagg_core.py#L190-L195.
Plus, we are still sending a full image. Maybe the png encoding does some compression if lots of pixels are transparent? If that is not the case, we are still sending the same amount of data.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
参照されている matplotlib/backends/backend_webagg_core.py の画像更新コードから始め、ipympl における対応する canvas 更新のエントリーポイントを追跡してください。提案されているバイナリデータのパスを現在の PNG パスおよび diff パスと比較し、いずれか一方を変更する前にベンチマークと受け入れ基準を定義してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, python
- 領域
- backend, frontend, performance
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100