user3162134
user3162134

Reputation: 307

Threads, priority and quality of service on IOS

Our game uses a CADisplayLink and OpenGLEs2.0 to try to render at 60fps. We have a few threads running too, to handle server calls, background loading, etc. I'm trying to optimise the background file loading and on a test if the priority is set to 0.5 - which seems to be the default - then it can load quickly, it can seem to slow right down and take 2-3 x as long, whereas if I set it to 0.8, it seems to always work quickly, but occasionally then it causes the CADisplayLink to miss firing at the correct time. If I set the priority to 1.0 it's barely faster but misses the CADisplaylink quite often. I'm nervous that this value is a bit arbitrary and may work differently on different devices.

I've read that there are other settings - QualityOfService and QueuePriority. Should I be using those as well as, or instead of the threadpriority. Should these values be set on the main thread ? How does the IOS decide how much time to give to each thread ?

Thanks

Shaun

Upvotes: 2

Views: 987

Answers (0)

Related Questions