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
It would probably be a bit faster to not return a subarray slice of a typedarray from the voxel mesher and instead return the entire unsliced typedarray + a size parameter for the number of vertices. That way the typedarray that it creates would not be truncated and could possibly be returned to the memory pool when it is done.
In a web worker type environment, the way this could work is the worker would generate typedarrays/chunks, pass them directly to the main thread which uploads them to WebGL, and then the main thread would pass them back to the worker which would put them back on the heap. (By calling typedarray-pool.free)
It would probably be a bit faster to not return a subarray slice of a typedarray from the voxel mesher and instead return the entire unsliced typedarray + a size parameter for the number of vertices. That way the typedarray that it creates would not be truncated and could possibly be returned to the memory pool when it is done.
In a web worker type environment, the way this could work is the worker would generate typedarrays/chunks, pass them directly to the main thread which uploads them to WebGL, and then the main thread would pass them back to the worker which would put them back on the heap. (By calling typedarray-pool.free)
https://github.com/mikolalysenko/typedarray-pool#poolfreearray
The text was updated successfully, but these errors were encountered: