Daniel
10/21/2020, 1:35 PMlaunch
. How can I launch coroutines from a non-suspend function in a fire-and-forget way faster?Marc Knaup
10/21/2020, 1:37 PMChannel
and have another coroutine go through all work in the channel and start a coroutine for each of them.
How many are you starting? 😮Daniel
10/21/2020, 1:38 PMBig Chungus
10/21/2020, 1:40 PMRobert Jaros
10/21/2020, 1:40 PMMarc Knaup
10/21/2020, 1:41 PM.offer()
Daniel
10/21/2020, 1:41 PMDaniel
10/21/2020, 1:41 PMDaniel
10/21/2020, 1:41 PMMarc Knaup
10/21/2020, 1:42 PMMarc Knaup
10/21/2020, 1:42 PMDaniel
10/21/2020, 1:42 PMDaniel
10/21/2020, 1:42 PMDaniel
10/21/2020, 1:43 PMMarc Knaup
10/21/2020, 1:44 PMonDraw
😅
Is it for some kind of asynchronous drawing?Daniel
10/21/2020, 1:46 PMMarc Knaup
10/21/2020, 1:48 PMlaunch
is really the curlpit.
Also remember that launch
causes a memory allocation for the coroutine function. Using a channel you could avoid that.Daniel
10/21/2020, 1:49 PMDaniel
10/21/2020, 1:49 PMRobert Jaros
10/21/2020, 1:50 PMDaniel
10/21/2020, 1:52 PMMarc Knaup
10/21/2020, 1:52 PMonDraw
related to preloading.
Can’t you find out in advance what tiles are in the rendering area e.g. in layouting or when scrolling?
Then queue tile loading there and once a new tile became available ask the view to re-draw the relevant part of the view.Daniel
10/21/2020, 1:53 PMDaniel
10/21/2020, 1:53 PMDaniel
10/21/2020, 1:54 PMMarc Knaup
10/21/2020, 1:55 PMDaniel
10/21/2020, 1:55 PMDaniel
10/21/2020, 1:55 PMDaniel
10/21/2020, 1:56 PMMarc Knaup
10/21/2020, 1:56 PMMarc Knaup
10/21/2020, 1:57 PMMarc Knaup
10/21/2020, 1:57 PMDaniel
10/21/2020, 1:57 PMMarc Knaup
10/21/2020, 1:58 PMDaniel
10/21/2020, 1:59 PMDaniel
10/21/2020, 2:00 PMMarc Knaup
10/21/2020, 2:00 PMDaniel
10/21/2020, 2:00 PMDaniel
10/21/2020, 2:02 PMMarc Knaup
10/21/2020, 2:03 PMDaniel
10/21/2020, 2:03 PMDaniel
10/21/2020, 2:03 PMMarc Knaup
10/21/2020, 2:05 PMMarc Knaup
10/21/2020, 2:06 PMMarc Knaup
10/21/2020, 2:07 PMDaniel
10/21/2020, 2:07 PMMarc Knaup
10/21/2020, 2:07 PMMarc Knaup
10/21/2020, 2:08 PMMarc Knaup
10/21/2020, 2:08 PMDaniel
10/21/2020, 2:10 PMMarc Knaup
10/21/2020, 2:10 PMDaniel
10/21/2020, 2:10 PM