I need help with optimizing something…
I have a worker that builds and computes mesh data for a quad tree. It is desirably fast.
It posts data for up to 15 meshes, each mesh has an average of 18,916 vertices (56,749 floats), some greater or less.
The problem is building the meshes.
This is my code for building each mesh:
Right now it just runs on a simple for loop.
I get a one to two seconds of delay when building on a workable resolution.
I tried using the setVerticesData but it was the same speed as applyToMesh.
I tried building them one by one with setTimeout but that piles up the worker’s posts.
Is there any way to speed it up/optimize this? Running the scene on a different worker wouldn’t make a difference because it’ll still freeze the camera.
Is it possible to build them on a worker? somehow??