plotly / plotly/plotly.js

Old WebGL contexts not destroyed after updating with React plot component

Open
#6,365 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3 size: 3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

This issue is related to #2852. I'm working on a dashboard using the React Plotly components with WebGL. I have become stuck because of the maximum number of WebGL contexts. The fix I had planned was to limit the number of charts so that the maximum wasn't crossed. But I'm also seeing that when a single plot component has its data changed, the previous WebGL contexts stay alive and will eventually have the same effect as having too many plots.

Is there a way to throw away the old WebGL context after updating a plot?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing repeated data updates in the React Plotly component with WebGL and inspect how plot updates manage WebGL contexts. Use the behavior described in #2852 as related context. Done means updating one plot no longer leaves its previous WebGL contexts alive or causes the browser's context limit to be reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
computer-graphics, data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.