Closed CeSun closed 1 year ago
No, and the reason is because there's not much that can be parallelized when loading.
You can always wrap the Load method with an await Task.Run( ... );
No, and the reason is because there's not much that can be parallelized when loading.
You can always wrap the Load method with an await Task.Run( ... );
I understand simulating async with threads. Regarding model loading, it may be possible to use async to optimize the IO of reading files. Or expose an interface for "analyzing model files from memory"
The bulk of the loading process is parsing the json, parallelizing loading multiple files (textures, binary blobs) it's usually not recomended because the storage device (Hard Disk) is usually a bottleneck, so you would end having multiple threads waiting for each other's non parallelizable IO operations.
In short, I don't think it's worth to overcomplicate things given the potential little benefits you could get.
such as: