openage icon indicating copy to clipboard operation
openage copied to clipboard

Speed up initial loading of the textures

Open stiopaa1 opened this issue 8 years ago • 3 comments

use several threads for loading SDL_Surface

stiopaa1 avatar Apr 30 '17 18:04 stiopaa1

Hm, so you're dispatching the loading to worker threads? Good idea, might speed up things (but I can't tell if it really is a bottleneck :) If you like, try our new benchmark functions :D

I haven't looked at benchmark functions yet, but this speeds up initial loading on my machine from around ~12s to ~6s.

stiopaa1 avatar May 01 '17 10:05 stiopaa1

@TheJJ Is that how JobManager should be used? There aren't too many examples in the code...

stiopaa1 avatar May 01 '17 10:05 stiopaa1

I'm just using enqueue() function in #749:

https://github.com/SFTtech/openage/pull/749/files#diff-37e9ae7e38604588a1695b75b95c39c8R103

Btw, the GL stuff is still in the render thread? AFAIK, it should remain there.

VelorumS avatar May 01 '17 11:05 VelorumS