Does network.request function run on different thread - best practice for expensive background processing logic

Hi network.* experts,

does someone know in which context / how the listener function is called. Is it run in a different thread outside of the lua jvm or is it taking CPU time away from the GUI (main) thread ?

We would like to do run some decryption and decompression code in the listener function , and as this code is pretty expensive, make sure that the UI experience is not impacted.

As Lua has coroutines and no pre-emptive threading, we were wondering about the best practice to achieve this.

Thanks
Frank

We also have this issue. Decryption seems to be slowing down the GUI substantially on Android (we invoke with the timer performwithdelay function). Is there a way to do this in a background thread?

I dont think there is a way to use background thread in Corona…

But if you can break down your decryption into small pieces, you can use timer.performWithDelay to space the processing of these pieces and reduce impact on GUI

We also have this issue. Decryption seems to be slowing down the GUI substantially on Android (we invoke with the timer performwithdelay function). Is there a way to do this in a background thread?

I dont think there is a way to use background thread in Corona…

But if you can break down your decryption into small pieces, you can use timer.performWithDelay to space the processing of these pieces and reduce impact on GUI