richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
30 stars 13 forks source link

Improve line drawing performance #145

Closed danielworkman closed 3 years ago

danielworkman commented 3 years ago

Swapped from canvas.drawLine() to canvas.drawLines() as this is much faster (hardware accelerated)

Panning and zooming large surveys should now be noticeably faster.

danielworkman commented 3 years ago

Of note from the drawLines doc:

Degenerate lines (length is 0) will not be drawn.

Which fits into what we were discussing about other perf ideas

richsmith commented 3 years ago

Of note from the drawLines doc:

Degenerate lines (length is 0) will not be drawn.

Which fits into what we were discussing about other perf ideas

Ah OK. Maybe we don't need to worry too much about filtering out small details then. Probably still worth checking, but low priority.