leeoniya / leeoniya/uPlot

[QUESTION] WASM backend

Open
#1,141 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
463
PR merge metrics
No merged PRs in 30d

Description

Hi, did you consider doing the processing of the "scene" in WASM then render by simply doing canvas.putImageData() ? All the drawing stuff could in principle be done in say C++, compiled to WASM using Emscripten, then plot/render using canvas? I'm wondering if that would be more efficient than using canvas itself for rendering? Dunno if you'd already considered or even tried this. PyQTGraph basically does this. All the "image processing" is done using numpy and scipy then offloads the rendering, i.e. the very last step, to QT. Otherwise, everything is done in numpy which is why PyQTGraph is so fast. In this case, all the processing, including decimating line graphs etc, could be done with a high performance library like Eigen, or a good Rust library. Maybe canvas is fast enough now that using WASM isn't worth it.

Contributor guide

No contributing guide indexed for this repository

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

No file, test, or concrete acceptance criteria are named. Start by locating the current scene-processing and canvas rendering entry points, then review the proposed WASM path using canvas.putImageData() and compare it with the existing approach. Done would require an agreed scope and evidence that the proposed backend improves performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
data-visualization, performance, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.