openlayers/ol3 — pull request #437 by twpayne (2013-04-04 21:49:55+00:00)
Title: Throttle image requests

Currently no more that 8 simultaneous image requests are simultaneously "in flight":
https://github.com/openlayers/ol3/blob/master/src/ol/tilequeue.js#L54

However, setting 'image.src = url' is very expensive and can currently cause us to overrun our 16 millisecond frame budget. The current implementation means that 8 images can be requested in the same frame, which is bad.

It would be better to slow down the image requests. Empirically, this means limiting the rate to 1-2 new requests per frame.

Empirically I've observed that ol3 is currently smoother on poor internet connections than on good internet connections. I currently attribute this to the fact that image requests naturally become more spaced out (i.e. more evenly distributed) on slow connections.