Hi,<div><br></div><div>Just wondering here how one could optimize the img loading of OpenLayers:</div><div><br></div><div>Would it be possible to load img srces with ajax and then assign the .src attribute on the <img/> element? That way it would be possible to cancel the loading of an img before it gets added to the dom and only render and therefore finish loading it if the user does not pan away from it.</div>
<div><br></div><div>Not sure if this is already happening, because I haven't checked, sorry.</div><div><br></div><div>I was stress-testing our applications with Chrome's profiler and the set src function was a significant candidate for optimization, because it seemed to be one of the heavier used functions up there with the anonymous function call inside the Util.bind function.</div>
<div><br></div><div>Also, I noticed that if one zooms and pans about a lot, after a while one gets white tiles and it seems like things are broken. Waiting for quite a bit revealed that the requests must have been running in the background and when they were finished the imgs were displayed. If we can cancel the img loads that are not within the current extent, we would probably save a lot of WMS requests to the server.</div>
<div><br></div><div>Does this sound sensible?</div><div><br></div><div>Cheers</div><div>Tim</div><div><br clear="all">++Tim Hinnerk Heuer++<br><br>Twitter: @timhheuer<br><div>Blog: <a href="http://www.thheuer.com/" target="_blank">http://www.thheuer.com</a></div>
<br>
</div>