feat: add WebGPU and WebGL2 chart renderers - #230
Open
ktsaou wants to merge 28 commits into
Open
Conversation
ktsaou
marked this pull request as ready for review
July 30, 2026 23:14
ktsaou
force-pushed
the
codex/webgpu-charts-integration
branch
from
July 30, 2026 23:46
82c3132 to
ed0cd26
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in Netdata-native GPU renderer with an internal fallback chain:
WebGPU → WebGL2 → visualization-specific legacy renderer
Public chart identity remains stable throughout selection and fallback. Consumers continue to render the same React component and see the established
chartLibraryvalues (dygraph,gauge,d3pie,easypiechart, and others); they never need to know which GPU backend is active.Dygraphs and all existing standalone renderers remain installed, supported, and enabled by default. GPU rendering is enabled only through
makeDefaultSDK({ acceleratedRendering: true })while broader rollout evidence is collected.Visualization coverage
Accelerated:
Bars, Value/Number, Group Boxes, and Table intentionally remain React/DOM-based. Gauge configurations using
staticZonesroute to the existing Gauge renderer rather than being approximated.Preserved contracts
Architecture and review order
src/sdk/makeChart/renderers/src/sdk/rendererRouting.test.jssrc/chartLibraries/gpu/src/chartLibraries/webgpu/src/chartLibraries/webgl2/src/components/chartContainer.jssrc/components/provider/selectors.jsbenchmarks/time-series-renderers/.github/workflows/tests.ymldocs/gpu-renderers.mdsrc/gpuRenderers.stories.jsThe neutral GPU layer does not import either backend, the backends do not import one another, and legacy renderers do not depend on GPU code. WebGPU and WebGL2 share neutral frame models while retaining explicit backend resource and loss handling.
Validation
Final validation on current
main:Installed integration validation used unmodified Cloud Frontend source and exactly one Chromium context/window/page:
chartLibraryvalues remained unchanged in all three phases; no backend names leaked to the consumerPrior physical Linux parity/performance runs cover both NVIDIA WebGPU and WebGL2 paths, exact pixel probes, 100,000- and 1,000,000-value workloads, exports, multi-chart teardown, WebGPU device loss to WebGL2, and WebGL2 context loss to each legacy renderer.
Rollout boundary
This PR delivers the complete installable implementation but does not change defaults. Windows/macOS hardware evidence, broader device coverage, power policy, prewarming/batching policy, opt-in UX, and any default switch remain separate rollout decisions.
The implementation is intentionally kept in one PR so maintainers can install and review the complete fallback chain. Maintainers can choose whether to split it before merge after reviewing the integrated proof.