1 person found this helpful
I/O operations are asynchronous, but that doesn't mean they run in parallel with each other. I doubt that the Air runtime will be loading your files simultaneously using hundreds of threads, so your requests are probably being queued-up under the hood. Even if it did spawn multiple threads, it is unlikely you will see significant gains over loading files sequentially.
I cannot explain the missing events, so these may be due to problems with the queuing mechanism. You could try listening for other events from your loader / parser objects in case any fault conditions are being reported. For example, LoaderInfo dispatches "ioError" and "Progress" events.
However, since your approach is unlikely to have any advantages over sequential loading you'd probably be better off just keeping it simple. Sequential loading has a number of advantages: It is much easier to show progress to the user, it is easy to halt the loading process and it is more efficient.
Thank you very much for your answer.
Actually I can see significant speed change using batch loading (batch of 5, 10, 20...) especially for small images; the ratio can be several times faster (when it is not missing file). If the batch size is to big, I start missing quite a bit.
But it is an interesting remark that I might be limited by the I/O access... I haven't thought about that.
I tried listening to events like IOError, or SecurityError, but none of them seemed to be triggered.
Anyhow, I still find it quite odd that events get discarded like that! And I can't find any documentation or thread about this anywhere.
I will investigate a little more before turning to sequential loading.