11-09-2020, 11:51 AM
(This post was last modified: 11-09-2020, 11:52 AM by josemendez.)
Quote:IJobFor has worked wonders for me to do lots of small jobs in parallel, like swapping textures on meshes based on indices and processing quadtree queries. I also use it for A-star pathfinding for up to 1024 pathfinding requests across 128 waypoints. I am aware of the overhead of scheduling, so I made a queue system that executes when a certain number is reached or at specified intervals.
We use the same concept: only call JobHandle.ScheduleBatchedJobs(); after a certain number of jobs has been scheduled (currently set to 16). Still, this was quite surprising to me at first, as the in-house job system we use for the c++ backend has virtually zero scheduling overhead.
Still trying to reproduce the initial issue, will get back to you as soon as I have an idea of what's happening.