You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The react profiler says that the culprit is in the Selection / Select component:
I see two issues with this component:
this condition is always true, which is why a call to select is triggered every time this hook runs. In my case, this condition is always true for the <group /> inside the <Select /> component. But more generally, I think it would be true for every non-Mesh in the tree.
here, the value of api is the "old" value, i.e. the value before api.select() was executed. Importantly, in my case, api.selected is always an empty array. Therefore, I believe the update of the selected objects shouldn't happen in a useEffect cleanup handler.
The text was updated successfully, but these errors were encountered:
Hi and thank you for your fantastic work on this project.
I've just encountered what I believe is a performance bug with the
<Select />
component. In this trivial example, I get a CPU usage of 100%:The react profiler says that the culprit is in the Selection / Select component:
I see two issues with this component:
select
is triggered every time this hook runs. In my case, this condition is always true for the<group />
inside the<Select />
component. But more generally, I think it would be true for every non-Mesh in the tree.api
is the "old" value, i.e. the value beforeapi.select()
was executed. Importantly, in my case,api.selected
is always an empty array. Therefore, I believe the update of the selected objects shouldn't happen in a useEffect cleanup handler.The text was updated successfully, but these errors were encountered: