Skip to content

Inspector: Add Memory tab and improve Renderer.info#33097

Merged
sunag merged 7 commits into
mrdoob:devfrom
sunag:dev-inspector-memory
Mar 1, 2026
Merged

Inspector: Add Memory tab and improve Renderer.info#33097
sunag merged 7 commits into
mrdoob:devfrom
sunag:dev-inspector-memory

Conversation

@sunag

@sunag sunag commented Mar 1, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #31869

Description

Adds initial support for memory analysis.

The PR also exposed a need to improve the architecture in the Backend functions such as updateSampler and updateBindings so that tracking buffers or interfaces becomes clearer and easier to sync using create/destroy, which should also help readability in the Timeline tab.

The memory analysis is still not considering the buffers used in the final screen output, the size will be a little smaller as a consequence.

image

@sunag sunag added this to the r184 milestone Mar 1, 2026
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.57
85.37
359.57
85.37
+0 B
+0 B
WebGPU 627.22
174.32
629.61
174.91
+2.4 kB
+588 B
WebGPU Nodes 625.8
174.07
628.19
174.66
+2.4 kB
+586 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 491.31
119.78
491.31
119.78
+0 B
+0 B
WebGPU 700.84
189.31
703.23
189.9
+2.39 kB
+594 B
WebGPU Nodes 650.04
176.67
652.44
177.29
+2.39 kB
+619 B

@sunag

sunag commented Mar 1, 2026

Copy link
Copy Markdown
Collaborator Author

This helped find a bug almost immediately in webgpu_loader_gltf, where it wasn’t disposing of the previous model.

@sunag sunag marked this pull request as ready for review March 1, 2026 17:50
@sunag sunag merged commit f122d43 into mrdoob:dev Mar 1, 2026
10 checks passed
@sunag sunag deleted the dev-inspector-memory branch March 1, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant