PATRIK27 / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Add functionality to overshoot LRU cache size #226

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now we try to only keep enough tiles in the cache to cover the entire 
screen (plus 2 in the constructor I believe). This is fine, but if you drag in 
one direction and back quickly, the screen has the tendency to blank (meaning 
only loading tiles are shown) since we have such a small border around our 
visible viewport. The tiles get pushed out very quickly and then it takes at 
least one draw cycle to bring them back into the cache.

Just artificially bumping up the tile cache causes visible improvements in 
drawing and virtually eliminates complete screen blanking after quick back and 
forth scrolling. If we all agree that it's worth it, we can permanently 
artificially overshoot the cache size, but that puts pressure on the memory and 
although reports of memory issues have been quiet lately, they have been an 
issue in the past.

The other option is to keep our logic as-is, but add a clear path to allow the 
user to overshoot the cache size themselves.

Original issue reported on code.google.com by kurtzm...@gmail.com on 31 May 2011 at 6:27

GoogleCodeExporter commented 8 years ago
Patch attached!

Original comment by kurtzm...@gmail.com on 16 Jun 2011 at 9:12

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by kurtzm...@gmail.com on 27 Jun 2011 at 8:07

GoogleCodeExporter commented 8 years ago
Is there any reason this hasn't been included? It really helps with the issue 
of constant GC_CONCURRENT garbage collection during quickly scrolling between 
places near each other as well.

Original comment by DuneL...@gmail.com on 7 Dec 2011 at 12:46

GoogleCodeExporter commented 8 years ago
I have been using this patch for a while and I think it's worth finally putting 
into the trunk.

Original comment by kurtzm...@gmail.com on 6 Apr 2012 at 7:01

GoogleCodeExporter commented 8 years ago
Fixed in r1086.

Original comment by kurtzm...@gmail.com on 6 Apr 2012 at 7:07