Search Issue Tracker
Fixed
Votes
0
Found in
5.4.2f1
Issue ID
841407
Regression
No
Multithread not working with IL2CPP
1. What happened
When using IL2CPP backend the ThreadPool.QueueUserWorkItem() multithreading method leads to slower performances for each thread created while Mono backend works as expected.
2. How we can reproduce it using the example you attached
I wrote a little script using multithread to dispatch a stupid algorithm incrementing an array of int. You can see threadcount, threadsize, average total duration in game view as well as estimated average time for each thread execution.
By building with Mono backend you'll notice that pressing "X" on the pad will change threadcount, globaly the more thread you set the faster the array is completed.
Then switch to IL2CPP and notice that even if performances are great using this backend, the multithreading support seems to destroy every gain and the more thread you use the slower the method is.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
wolilio
Mar 23, 2021 08:38
not fixed in 2020.2.5f1!!