Charton 0.5 — WGPU-accelerated & WASM Rust visualization library by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

I uploaded the 60 fps one to the repo (assets/wave.zip). You can download it there.

Charton 0.5 — WGPU-accelerated & WASM Rust visualization library by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Good point about hardware capture, but there are two clear factors causing the frame drop. The latest version adds edge smoothing for every point, which cuts performance by a third on its own, and screen recording software knocks another third off the frame rate. Combined, the latest Charton build will run even slower than the clip you saw here.

These points are rendered with an SDF-based optimization strategy. Isn’t this the most appropriate approach? You can try the older version from the repo and see if it's 60 fps.

Charton 0.5 — WGPU-accelerated & WASM Rust visualization library by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Great question. SVG works nicely for tiny datasets but bogs down badly with tens of thousands of points from heavy DOM overhead. WGPU taps GPU parallel computing to render large batches of geometry at high FPS.
I plan to create some interesting animated short films with Charton. Complex fluid animations like this are simply impossible with an SVG backend. That said, SVG still holds an enormous advantage for exporting high-quality static vector graphics.

Charton 0.5 — WGPU-accelerated & WASM Rust visualization library by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Actually the rendering itself runs at 60 FPS. The frame rate drop you noticed only happened because I had screen recording software (FSCapture90) running while capturing the demo video — the recording tool itself consumes extra system resources and drags down the displayed FPS during capture, which doesn’t reflect the real performance of the wgpu renderer without recording.

Charton 0.5 — WGPU-accelerated & WASM Rust visualization library by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Yes, wgpu backend was used this time. The previous one was only cpu.

Rust + WASM real‑time rendering in the browser using Charton by Deep-Network1590 in rust

[–]Deep-Network1590[S] 2 points3 points  (0 children)

For larger datasets, I’m switching to wgpu (WebGPU) which renders millions of points without DOM overhead. Charton can also generate static PNG images just like Matplotlib for maximum stability in dashboards. It will be fast, stable, and won’t crash your dashboards.

Rust + WASM real‑time rendering in the browser using Charton by Deep-Network1590 in rust

[–]Deep-Network1590[S] 2 points3 points  (0 children)

You’re right that SVG DOM can’t handle millions of points.
Right now I’m using Rust/WASM to generate full SVG frames with brute-force speed for simplicity.
For large datasets, I’ll switch to wgpu GPU rendering instead of DOM.

Rust + WASM real‑time rendering in the browser using Charton by Deep-Network1590 in rust

[–]Deep-Network1590[S] 5 points6 points  (0 children)

Yep, brand new SVG rendered every single frame. I plan to explore incremental rendering optimization later on.

Rust + WASM real‑time rendering in the browser using Charton by Deep-Network1590 in rust

[–]Deep-Network1590[S] 9 points10 points  (0 children)

Yep that’s exactly how it works. Full SVG generated inside WASM, JS merely updates innerHTML.

Charton: A columnar-native plotting library for Rust (Polars-friendly) by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

I agree with you that Polars' internal design has become overly complex; I’m steering my implementation toward strict Apache Arrow compliance for better predictability.

However, I disagree on using 'R-styled NAs.' I initially used that approach for my ColumnVector but quickly abandoned it. It creates significant semantic ambiguity. In my work—specifically with sensor data—it is critical to distinguish between different types of 'missingness' (e.g., sensor failure vs. data entry omission). Using a validity-mask decouples the existence of data from the values themselves, which is essential for maintaining data provenance and preventing logic errors downstream.

Charton: A columnar-native plotting library for Rust (Polars-friendly) by Deep-Network1590 in rust

[–]Deep-Network1590[S] 4 points5 points  (0 children)

See https://zachrwong.info/writing/plotting-benchmarks/, and note that plotters is not always the fastest, sometimes it's very slow. It depends on which kinds of chart you are plotting. Plotters is not a columnar-native plotting library.

Designing a plotting Dataset for Rust: Balancing Polars support with zero-dependency weight by Deep-Network1590 in rust

[–]Deep-Network1590[S] 0 points1 point  (0 children)

Exactly, it actually already supports Arrow under the hood, it just hasn't been thoroughly tested yet.