plotly / plotly/plotly.js

[BUG]: scattergl hover freezes with more than 100.000 points all with different x but same y

オープン
#8,036 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

bug P2 size: 3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Description

In scattergl, when you have more than 100.000 points the scattergl freezes when trying to hover, more informations in the steps to reproduce.

Steps to reproduce

In version 4.0.0
Create a scattergl with 100.000 points with x just the index of the point and y all the same.
you can use this snipper

const n = 100000;

Plotly.newPlot('graph', [{
  type: 'scattergl',
  mode: 'markers',
  x0: 0,
  dx: 1,
  y: Array(n).fill(0)
}]);

The default hovermode will be ok, no need to change it.
Try hovering on the point: the app freezes immediately.
Staying in the horizontal line of the points will make it look a little slow but normal, but when you exit from the line it freezes again.
Try removing one point (99.999 points): the freeze is gone.

Notes

Probably related to #6792 and #5790 but can't confirm if it's completely the same, this is more specific.
It is probably due to to the collapsation of the algorithm that comes in in a scattergl when there are TOO_MANY_POINTS (exactly 100.000).

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

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

はじめの一歩

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

調査の方向性

まず、Plotly.js 4.0.0 で提供された scattergl JavaScript スニペットを使って問題を再現し、100,000 点と 99,999 点でのホバー動作を比較します。レポートで言及されている scattergl のホバーパスと TOO_MANY_POINTS の処理を、issues #6792 と #5790 を参考にして追跡します。報告されたデータでホバーがフリーズしたり異常に遅くなったりしなくなれば完了です。

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

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

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

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