All,
I’m working on an Flash/AS3 project that makes numerous URLLoader.load() requests.
Should I queue them so that there’s only a single open request at any time? Or, is it a good practice to allow multiple open requests?
Is there a limit to the number of open requests?
(I’m assuming I can manage the implications in the UI).
I’ve run tests locally with up to 5 simultaneous requests, and it works just fine. But I need to make sure the application will work in the field, for users with older PCs, older browsers, browsers with multiple open tabs, etc.
Many thanks in advance for any advice and insight!
I ran into this problem ages ago when I was trying to load a ton of images. They were all local, so I just queued them up with the Loader. Queue hours debugging why images were null :S
I’m not sure if the limit is mentionned anywhere, but I found (if memory serves) around 30 was giving me problems. After that and I think it would reuse old connections: so if you have 100 load() calls, only the last 30 or so would be loaded.
Normally I queue up about 10 at a time, then load in the rest as they get completed. There’s no real problem with multiple connections – though they will start to take up CPU power etc.
If you want to just ignore this, check out something like BulkLoader: http://code.google.com/p/bulk-loader/ which was created for this