Re: Good Fowler article on ORM
 
markspace wrote:
Jan Burse wrote:
markspace schrieb:
Just curious: I've never done an Android development. How does one
profile code for that environment? Do you have a Dalvik JVM that runs
on Windows/Unix (i.e. an emulator of some sort)? Is there a good
profiling tool that can attach to certain Android devices?
I guess there are some tools around. Android has its own
way of instrumentation for tracing.
http://developer.android.com/guide/developing/debugging/debugging-tracing.html
Good link, thanks for posting that.
But I did not yet use it. Was just benchmarking my App and
saw that it runs much slower on Android. But that has also
to do with that I was using a tablet with something of 1GHz
ARM and was comparing against a 3.4GHz 64-bit Intel.
Oh, really? You think that just might have a teensy-weensy little bit to do 
with the performance difference, just maybe?
I've worked a bit with Android code and deployment environments here and there.
No question, you have to be rather conservative of resources in Android, but 
it's at the platform level for the most part, not the JVM level.
I am highly dubious of the claim that accessor/mutator time was the major 
determinant of the putative performance issue.
Android deployments suffer from platform limitations - Jan mentioned one, the 
slower ARM vs. the customary wideband desktop, usually multicore. The 
programming model differs, too. Android is more like a Xen or other 
virtualized meta-OS, with each Dalvik a different virtual host.
So things move in and out of memory differently - think of old-fashioned 
memory overlays - than they do on the desktop. Applications move in and out of 
memory on Android at the whim of Android, not Dalvik. You do have to bear this 
in mind as you write for Android. For example, you have to be ready to resume 
your application from a total shutdown at any instant, even just to change 
orientation. You're far more bound to the UI than you might be used to.
Your GC is clunkier than Java SE's, and you sort of do have to watch your RAM, 
and more importantly, your threads.
But RAM on a typical Android device ranges from a quarter gigabyte up. We're 
not talking microwave-oven controllers, here. These are quite literally pocket 
supercomputers. 1 GHz is slow? Come on!
Another factor is logging. Android has a syslog called "logcat", to which 
everyone, their cousin and the family dog contributes. That surely affects 
performance, and it makes it interesting to find your own log data amidst all 
the noise.
How many of you are good at designing log output?
Liars. Of the ones who did not raise their hand, about half likely are good at 
it. That's why they don't claim to be. The other half have a hope to be someday.
-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg