Comfy-Org / Comfy-Org/ComfyUI_frontend

[Bug] protential performance issue for 3d nodes

Open
#3,333 2 comments 0 reactions 1 assignee Claimed by @jtydhr88 View on GitHub
area:3d area:nodes perf:memory perf:speed
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

2025/06/05 update
The following issue already got fixed by https://github.com/Comfy-Org/ComfyUI_frontend/pull/3961, but still having the issue of a large number of load3d node, so keep this issue opening for now

> Currently, when we remove 3D nodes from the workflow, their corresponding two WebGLRenderers are not released simultaneously. This can lead to potential issues, such as when repeatedly adding and removing 3D nodes up to a certain number of times, even if there is only one 3D node in the workflow, the browser will trigger an error indicating that it has reached the Context limit.
>
> Test case
> 1. In a workflow without any 3D nodes, the browser's current WebGLRenderer count is 0
> ![Image](https://github.com/user-attachments/assets/bd88f79b-1ba8-42ee-82ff-28c4cf8837e9)
> 2. After adding one 3D node, the browser's current WebGLRenderer count becomes 2 (which is reasonable, as one is used for rendering the main scene and one for the preview view).
> ![Image](https://github.com/user-attachments/assets/de0a334c-6fd8-4e62-8a34-4fb4f613de93)
> 3. However, when the node is removed, the WebGLRenderer count remains at 2, indicating they have not been properly released.
> ![Image](https://github.com/user-attachments/assets/c2d85a8a-1609-4f81-bfcb-ce0c4046b7aa)
> 4. Additionally, it can be observed that the scene is not cleaned up completely. There are still some objects that remain uncleaned, which also needs to be addressed.
>
> ![Image](https://github.com/user-attachments/assets/fd30b999-422b-4ce6-8fff-9f40b1f18ee9)
>
> ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-3333-Bug-protential-performance-issue-for-3d-nodes-1cd6d73d365081fdb9a0e126ff6445d6) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.