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

Performance with large number of geometries #181

Open
garma83 opened this issue Jan 9, 2023 · 0 comments
Open

Performance with large number of geometries #181

garma83 opened this issue Jan 9, 2023 · 0 comments

Comments

@garma83
Copy link

garma83 commented Jan 9, 2023

Hi,

This is mainly a warning for future users I guess.. Im happy to contribute but the original creator seems to have abandoned this package.

Anyway, the FAQ states that this package is just as performant as Three.js. This is not my experience in practice. The package creates geometries and meshes with large amounts of props, and attaches watchers to all of them. That is fine and even convenient for limited number of objects. But for scenes with more than 100 objects, mounting/dismounting the scene caused a lag of multiple seconds, even though three.js has no problem with it.

InstancedMesh can be a solution, but for situations where the objects are not the same (custom generated, or have different textures) this is not.

I have some ideas how to fix this, but would need involvement of the author:

  • Implement the ability for geometry-components to accept arrays of parameters, which would then create arrays of three-geometries
  • Implement MergeBufferGeometry which would convert multiple geometries to a single one (this way you can support 1000s of objects). It would still need a way to avoid creating thousands of components though.
  • implement a way to disable reactivity (assuming its all the watchers that are the problem)
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

No branches or pull requests

1 participant