PDA

View Full Version : SKMaps blocking the Main Thread



martinhiq
02.02.2016, 10:14
Hello

I am working with my team on a Swift application using SKMaps. After some testing with SKMaps we think we have located a problem with it, in association with our functionality.

We rely on a timers to start our functionality. This timer instruments our functionality to be triggered each 50ms on the main thread, but it appears that SKMaps is doing something on the main thread for 100ms, that inhibits our functionality to trigger on the correct time.
Instead the functionality triggers after those initial 100ms, which means that when our timer triggers for the second time our function has not fully ran.

What is suppose to happened:

Timer-----Func----------------------Timer-----------Func-------------------
0_______50ms_______100ms___120ms_______170ms______ _220ms

What is happening:

Timer-SKMAPS-----------Func------Timer-SKMAPS-------------------Func--
0_______50ms_______100ms___120ms_______170ms______ _220ms

In short: The function has not the time it needs to execute all its functionality

Is it possible to keep SKMaps from not occupying the main thread for 100ms, or is it possible to alter SKMaps to run on a background thread for example?

Adela_Silvia
04.02.2016, 16:26
We'll need to check this information with our developers. We'll get back to you as soon as possible (some delay might appear as all our developers are fully booked with the new releases and the enterprise requests)

[Update: 29-02-2016]:
"All UI-related operations (including rendering) must be done on Main thread, so there's nothing we can do about this.
Talking into consideration the provided details we cannot suggest any workarounds.
If the timers are needed at app startup, maybe you can initialize the framework later, but that depends on your internal logic."