Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: Avoid using proxy in rendering cycle #29094

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Aug 9, 2024

Related issue: #29066 (comment)

Description

Proxy should be avoided in the rendering cycle as they harm performance.

@sunag sunag added this to the r168 milestone Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.1 kB (169.6 kB) 685.1 kB (169.6 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
462 kB (111.5 kB) 462 kB (111.5 kB) +0 B

@sunag sunag marked this pull request as ready for review August 9, 2024 03:56
@sunag sunag merged commit 69a853d into mrdoob:dev Aug 9, 2024
12 checks passed
@sunag sunag deleted the dev-performance-1 branch August 9, 2024 03:57
@0b5vr
Copy link
Collaborator

0b5vr commented Aug 20, 2024

This PR improves the CPU load on WebGPURenderer!
It's still less performant compared to WebGLRenderer though, the bottleneck still comes from somewhere around NodeMaterial according to Chrome DevTools profiler.

image

@0b5vr
Copy link
Collaborator

0b5vr commented Aug 20, 2024

about updateNode, it seems we are simply doing crazy amount of updateNode invocation for webgpu_performance.html.

I count the call of updateNode for each updateType per single renderAsync:

"render": 2397
"object": 10376
"frame": 6384

This is the content of nodeBuilder.updateNodes:

image

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.

2 participants