xtreampb Posted November 22, 2014 Share Posted November 22, 2014 Loading my simple, small map takes a good bit of time. Is it possible to make my Map::Load(std::String) multi-threaded? I would like to load each entity using a separate thread from a pool of threads. So something like: Map::Load(std::String PathToMap, int numThreads); it would create numThreads +1. spool one thread to manager the other threads and will receive the result (returning entity) from each thread. If there are other entities to load, will then begin loading another entity with the recently returned thread. once all entites are loaded, the map object is then sent to back to the main thread. This would allow me to create like a loading screen that isn't stalled. I suppose i could do this myself, i would just need to know how the map::load function finds it entities (gets it's list and path) Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Josh Posted November 22, 2014 Share Posted November 22, 2014 I would not attempt this. Map entities are intermixed in all sorts of different ways, and the OpenGL calls are all over the place too. It's just not a problem that can be easily parallelized. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtreampb Posted November 22, 2014 Author Share Posted November 22, 2014 ok so instead of a pool for map::load could i spool off the map::Load into a thread to not tie up my UI? Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
shadmar Posted November 22, 2014 Share Posted November 22, 2014 Try setting this to 1, it will speed your loading up alot (not sure it's supported tho) http://www.leadwerks.com/werkspace/topic/9840-deferred-texture-loading/page__hl__deferred+texture Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.