> Please bear in mind that you are writing applications to run on mobile
> devices whose horsepower is reminiscent of PCs from a decade ago.
>
> Programming techniques that you might use on a current PC with tons of
> RAM, fast CPUs, and access to constant AC power are not necessarily
> recommended in a mobile device environment.

At the risk of replying to myself, let me clarify.

Creating more garbage to gain cleaner APIs is a trade-off. Created garbage
may affect your application, and it may affect other applications -- we've
had complaints on this list already from game developers who cannot
maintain consistent frame rates because of garbage collection in other
applications.

Similarly, adding extra VM instructions, to create DatabasePolygon objects
and pull data out of Cursors, chews up battery life.

You did not indicate whether you database will have one or 10,000
polygons. The magnitude of the extra garbage and instructions will be tied
to the number of polygons you create.

So, while I agree with you that dealing with Polygon objects may be tons
cleaner than dealing with Cursors, bear in mind there is a cost involved,
and be sure to weigh that cost when deciding what to do.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to