Open GoogleCodeExporter opened 8 years ago
Out of curiosity, how much did this speed things up? How many objects are you
working with.
Although I think the Canvas doesn't actually draw things that are out of the
clipping rectangle, this should still speed things up and it can save us some
work - possibly in other areas too like object clicking!
Original comment by kurtzm...@gmail.com
on 31 May 2011 at 6:13
I was working with about 3700 objects (soon to be about twice that many).
Right now it's a list of all the bus stops in San Francisco, with the map
centered on Market & Van Ness @ zoom level 16. The scrolling went from jerky
to pretty darn smooth on my Optimus V (still a bit jerky in the emulator tho).
You're correct in that the actual drawing doesn't take too long, but scrolling
becomes a mess. The big bottlenecks for me seem to be in fetching the data
from the database and just creating that many objects.
The next iteration that I was going through in my head was to actually create a
function that would get the list of visible overlays, and have the draw
function call that and use a fast(er) iterator. The goal there, of course, is
to overload the "list of visible overlays" function so that I could dynamically
toggle which groups of overlays to display without having to muck about with
the base class.
Original comment by alex.zep...@gmail.com
on 31 May 2011 at 10:32
Original issue reported on code.google.com by
alex.zep...@gmail.com
on 31 May 2011 at 6:36Attachments: