bevy_simple_tilemap
bevy_simple_tilemap copied to clipboard
Parallel iterator performance issues
Was seeing some hitches in extract_tilemaps with a low amount of tiles, maybe 100-200? It sometimes gets up to 10ms.
It seems like par_iter is the culprit, I'm not sure what it's default behavior regarding splitting work between tasks, but has a pretty big impact on the time here. I am wondering if perhaps this should be behind a feature flag, or possible disabled by default. (Maybe it could be faster for large enough workloads, unsure).
Below is a histogram of this function, yellow is .iter(), red is .par_iter().