mozilla/MozStumbler — pull request #1040 by garvankeeley (2014-10-20 16:22:46+00:00)
Title: 1002: Point draw performance. Use 2d hash grid to reduce number of points drawn

For #1002

This uses a 2D hash grid to reduce the number of points drawn at a given zoom level. Recalculate each time the zoom level changes. The hash value is based on the x and y pixel, but scaled down to reduce the detail level (and increase collisions and reduce the data). If a particular hash slot is occupied already, then don't draw the point. (Note, I added a bit of logic here, so that if the observation point is "better" [i.e. cell+wifi is better than cell], then it takes the hash slot.

Tested on Nexus 5 4.4.4 and Samsung Duos 2.3.6.

Testing is performed with:
4800 point kml file
https://drive.google.com/file/d/0B1sYPwjczMsQM1VDdXdacGpDdEE/view?usp=sharing

Put it in: sdcard/Android/data/org.mozilla.mozstumbler/files

The go to load KML in the app.