1. Download our Official Android App: Forums for Android!

Galaxy Nexus Watering Hole

Discussion in 'Off Topic' started by BabyBlues, Dec 6, 2011.

  1. HanSolo

    HanSolo Android Expert
    Rank:
    None
    Points:
    113
    Posts:
    860
    Joined:
    Mar 12, 2012

    Mar 12, 2012
    860
    292
    113
    Male
    Thanks for that explanation, Early!

    I DID have some lag even from day 1 out of the box. For example, I'd press the home or power button when it was asleep, and it would take a good 2 or 3 seconds to wake.

    But other things started lagging as the days went by. That would be ridiculous if it was hardware degradation after such a short time.

    So in your opinion, why do iOS devices seem to have extremely little to no lag in comparison with Android devices?
     

    Advertisement

    EarlyMon likes this.
  2. Stigy

    Stigy Some say...
    Rank:
    None
    Points:
    413
    Posts:
    4,100
    Joined:
    Nov 5, 2009

    Nov 5, 2009
    4,100
    3,023
    413
    Male
    Here's an interesting read (with some other links) if interested.

    Are programs written in Java for Android slower than equivalent written in C embedded into Objective-C for iOS? - Stack Overflow
     
    EarlyMon likes this.
  3. EarlyMon

    EarlyMon The PearlyMon
    VIP Member
    Rank:
    None
    Points:
    5,218
    Posts:
    57,591
    Joined:
    Jun 10, 2010

    Jun 10, 2010
    57,591
    70,376
    5,218
    New Mexico, USA
    Yeah. No.

    That's a grotesque attempt at describing one optimization.

    The part about the Dalvik cache being recreated at boot up is true but poorly written.

    When you wipe the Dalvik cache, commonly called wiping the Dalvik, then it will be built properly on boot up.

    That's why you can do the wipe in the first place.

    Android = embedded real-time Linux operating system + the Dalvik Virtual Machine + apps that run in the Dalvik and use Linux system services.

    If you have a Java app and you want to run it on your pc, you have to have to have the Java VM installed because it runs inside that.

    Java apps for us pick up some resources and get placed into a container called an apk - and an apk is very much like a zip file.

    Those apps then run inside the Dalvik.

    Native apps in Android have the main portion wrappered and that runs inside the Dalvik.

    But I think that you know all of this as you've developed apps, so I'm not sure what you found interesting in your reddit quote.

    The Dalvik is a sophisticated stack engine whose details can be easily found and understood more quickly if you're familiar with stack engines. They've been around for decades.
     
  4. MSUgEEk

    MSUgEEk Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    3,696
    Joined:
    Apr 22, 2010

    Apr 22, 2010
    3,696
    1,418
    313
    Electrical Design Engineer
    Northwestern Alabama
    I'm a mid-level programmer and you lost me on that Early, lol. Probably because I'm out of practice though...
     
    EarlyMon likes this.
  5. Stigy

    Stigy Some say...
    Rank:
    None
    Points:
    413
    Posts:
    4,100
    Joined:
    Nov 5, 2009

    Nov 5, 2009
    4,100
    3,023
    413
    Male
    I understood most of that and have a decent understanding of what goes on under the hood from doing development, a decent amount of reading and having a background in Unix.

    I guess the part I found interesting is that "...hot spotting portions of them to native code.", which based on your above I am not sure it is true or not.
     
    EarlyMon likes this.
  6. jmar

    jmar Nexican
    Rank:
    None
    Points:
    523
    Posts:
    4,850
    Joined:
    Sep 27, 2010

    Sep 27, 2010
    4,850
    3,131
    523
    Male
    Sales
    San Jose, CA
    Morning y'all!

    Look, I'm no app dev or anything like that but here's the thing: iOS devices may not show the same lag over time like a cheap Nexus 7 might, but it is certainly not the fast, lag free, operating system some make it to be.

    Been using this iPhone 5 now for a month and the way I would describe the experience is rhythmic. The OS keeps a certain rhythm that is consistent and familiar. And while that rhythm isn't slow, it isn't as fast as the Nexus 4 I was using before it. The Nexus did just about everything faster. But when one task doesn't go at the same speed as the rest, we call it lag.

    Now in Han's case, it sounds like deadlocks from Android 4.3 combined with TouchWiz causing freezes and terribly noticeable lag. I experienced deadlocks on 4.3 with my Nexus.

    Anyway, hope that made some kind of sense.

    Now Google, can we just get on with it and release the Nexus 5 already?

    Thanks,

    jmar
     
  7. Unforgiven

    Unforgiven ...eschew obfuscation...
    Moderator
    Rank:
     #1
    Points:
    4,488
    Posts:
    38,270
    Joined:
    Jun 23, 2010

    Jun 23, 2010
    38,270
    47,474
    4,488
    Male
    Douglas, MA
    My kind of Halloween prank.:evil:

     
  8. MSUgEEk

    MSUgEEk Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    3,696
    Joined:
    Apr 22, 2010

    Apr 22, 2010
    3,696
    1,418
    313
    Electrical Design Engineer
    Northwestern Alabama
    Hey Stig, do you use Google Analytics in your app?
     
  9. BabyBlues

    BabyBlues Trouble Just Finds Me!
    Thread Starter
    Rank:
    None
    Points:
    1,333
    Posts:
    13,125
    Joined:
    Jun 3, 2010

    Jun 3, 2010
    13,125
    9,766
    1,333
    Female
    Masquerading as a responsible adult
    Jersey - born & bred
    I'd have to go home and change clothes if I saw that but it was funny!
     
  10. Stigy

    Stigy Some say...
    Rank:
    None
    Points:
    413
    Posts:
    4,100
    Joined:
    Nov 5, 2009

    Nov 5, 2009
    4,100
    3,023
    413
    Male
    Unfortunately not yet - next update will include it though.

    Only insight I have is downloads & installs.
     
  11. MSUgEEk

    MSUgEEk Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    3,696
    Joined:
    Apr 22, 2010

    Apr 22, 2010
    3,696
    1,418
    313
    Electrical Design Engineer
    Northwestern Alabama
    Same here, was wondering if you had tried it. I may update my app to add it. I cracked the 9k active installs last week and should hit 10k before November is over. Just curious where my traffic is coming from.
     
  12. Stigy

    Stigy Some say...
    Rank:
    None
    Points:
    413
    Posts:
    4,100
    Joined:
    Nov 5, 2009

    Nov 5, 2009
    4,100
    3,023
    413
    Male
    Going to try to update my Hackintosh to Mavericks tonight - I have a clone of my boot drive just in case, but I am excited to try this, throw some more RAM at it and do some iOS development.
     
  13. EarlyMon

    EarlyMon The PearlyMon
    VIP Member
    Rank:
    None
    Points:
    5,218
    Posts:
    57,591
    Joined:
    Jun 10, 2010

    Jun 10, 2010
    57,591
    70,376
    5,218
    New Mexico, USA
    There's been an optimization movement afoot since last year called Linaro.

    It's been making its way into Android bit by bit, you can expect to see custom roms compiled with a bit of it already.

    The following video shows it being unleashed for the first time back in 2012.


    You may note with interest that the processor chosen at the first target for that demonstration is the OMAP 4430 - reminder: the one in the GNex, so now we're topical to that as well as Android.

    You all heard me talk about the power of that processor in the pre-release thread.

    That video finally illustrates what I meant was possible. From how Google talked back in 2011, that's the performance we all expected anyway.

    The next stage in optimization, rumored for Android 4.4, is to transform some of the Java code into native code.

    The optimizations there are more about time lost for context switching than native vs. Java.

    That work was demonstrated in 2010 but we learned only recently (10/22) that Google has been busy for a year buying that technology and has finally done it.

    Google's FlexyCore purchase could mean a smoother Android

    The samples from 2010 have been pulled by Google now.

    THAT story is the source of the latest belief that there's something converting Java out of the Dalvik and into native code.

    It hasn't been deployed before and it's pure speculation if any of it is in 4.4.

    Personally, I don't believe at this juncture that it's in there yet.

    The respondents there were upset that the question was wrong.

    I have to agree because it's blending the difference in languages and operating systems and trying to make it a language question.

    The apples to apples comparison for starters is how does Java compare to native code on Android?

    Answer below:


    So - it's not huge, just taking the native code bit.

    However, some things DO benefit from that optimization.

    Here's a video showing the difference Flexycore makes on a TI development phone using the - wait for it - OMAP 4430 found in the GNex.



    So that leaves the final difference - Android vs. iOS and that's Han's question.

    Good news! :)

    I come bearing few opinions and many facts.

    The first fact is that Android lag and fluidity vary a lot by user within a given device model and that has a simple explanation due to two other facts - not all apps are created equally and Android is rich in configuration options, both affect the end result.

    So why has iOS been more fluid, even on lesser, slower processors with less ram?

    First fact - prior to iOS 7, their multitasking has been slim - it's cooperative multitasking while ours is preemptive multitasking.

    Focus on that fact above - all blessings and curses flow from that single design difference between iOS and Android and that's the big fact.

    If you ever ran Windows 95, then you've run cooperative multitasking before. Modern Windows is preemptive, so is OS X, Linux and therefore Android.

    In a cooperative multitasking system, the foreground app takes over nearly everything. You know that from Win95. Curse iOS.

    And if that's all your processor has to support, then it can do a rocking a job and not have to be a beast processor. Blessing iOS.

    Android can't be that way because it's based on Linux. Curse Android.

    But that architecture lets Android have a lot more flexibility and configurations. Blessing Android.

    With me so far?

    So the first outcome of that difference is -

    • when Apple changes processors significantly, apps have to be redone and re-optimized and then re-aquired by the end user when available
    • not Android, when dual core and then quad core hit we didn't need all need new apps (many of you may remember my assurances on that from the pre-release thread and if you do remember that, then you know from experience I was sharing a fact then) - the architecture makes it so apps don't care
    • Advantage Android for ease of platform choice by users, advantage iOS for highest level of per app optimization
    Finally, iOS allows some apps to play a trick called GPGPU - general purpose processing using GPU cores that are available.


    That's another old trick, I used to write GPGPU applications in assembly for HP workstations back in the early 80s.


    That code is not transportable and not something you really want to go for in Linux.


    But - a number of iOS apps do that. I know in particular that their pro media editing app used by pro photographers do exact that.


    And that's attractive in the iOS world because what Apple processors lack in CPU power, they make up in their GPUs. Apple's always been media centric and since the change to OS X way over a decade ago, they've been focused on media (introducing the iPhone, our best iPod ever - look it up, that's was Steve's keynote speech when they launched it) and PDFs.


    I mention that as a point of interest to Han - when OS X hit, it took nothing to convert anything to a PDF, the underlying tech was built into the desktop itself. Windows users had to buy Adobe Distiller back then and Linux users were converting postscript into PDF by hand in those days.


    But the simple version of all this comes down to what you already know:



    • Apple chooses your hardware for you so you don't make the wrong choice and all of the software exploits that
      • Within the limits of the closed choices available
        • You cannot send me a youtube that I cannot play on my Android phone (except for where I'll respect copyright restrictions).
        • I can send a youtube that no iOS user will ever see until they get home.
    • Android lets you choose any hardware and then adopts two burdens:
      • Android responds better to better processing and memory resources
      • It's up to Android to produce competitive optimizations because the architecture says - don't force that entirely onto the app developer


    But in the really advanced media processing apps - raw digital image processing, soundboard mixers and PDF markup apps as well as a number of games - iOS is still winning because their optimization techniques allow them to.


    Each iteration of Android is bringing new optimization techniques that is allowing the gap in those areas to be closed.


    ^Those are all facts.


    I promised some opinions as well, here they are -


    I think that eventually all of the scales will tip in Android's favor..


    I think that if Google coorporate stops focusing on that and continues on their Apple-like path lately adopted to bring you into a closed world that they control for profit, then Android will become closed and a new open competitor will emerge. See me on the forum for that new platform when the day comes (and it's not going to be Ubuntu or Firefox - I don't know what it'll be, but it won't be those).


    There is no perfect device or mobile operating system. Get what works for you and for your needs, whatever it may be.


    These companies are not our friends, they're our suppliers. If we buy what we really like and need then if they're smart, they'll continue to improve their offerings to us to compete for our money.


    Bling bling, dollar dollar bill, y'all. - Wu Tang Clan Financial


    Advantage - us.
     
    RazorSharp, Kaat72, HanSolo and 4 others like this.
  14. halon

    halon hakuna matata
    Rank:
    None
    Points:
    413
    Posts:
    4,402
    Joined:
    Apr 13, 2010

    Apr 13, 2010
    4,402
    1,396
    413
    Boilermaker, Norfolk Southern
    Altoona, Pennsylvania
    C.R.E.A.M.

     
    jmar and EarlyMon like this.
  15. EarlyMon

    EarlyMon The PearlyMon
    VIP Member
    Rank:
    None
    Points:
    5,218
    Posts:
    57,591
    Joined:
    Jun 10, 2010

    Jun 10, 2010
    57,591
    70,376
    5,218
    New Mexico, USA
    That and forum rules prevent me from posting the Wu Tang Clan Financial youtube - it's from The Chappelle Show.

    I was quoting from memory but they may have used the C.R.E.A.M. lyric exactly.
     
    jmar likes this.
  16. jmar

    jmar Nexican
    Rank:
    None
    Points:
    523
    Posts:
    4,850
    Joined:
    Sep 27, 2010

    Sep 27, 2010
    4,850
    3,131
    523
    Male
    Sales
    San Jose, CA

    Early,

    Kudos on the Wu Tang reference! :D

    I agree with everything you said (who wouldn't?).

    Really looking forward to getting back on Android with the Nexus 5 and Android 4.4 (technically I haven't left because my Nexus 7 (2012) is still rocking with AOKP!). Hopefully the N5 camera is as amazing as this one on the iPhone. Either way my money is ready!

    @google: #mybodyisready
     
    EarlyMon likes this.
  17. The_Chief

    The_Chief Accept no imitations!
    VIP Member
    Rank:
    None
    Points:
    2,118
    Posts:
    13,886
    Joined:
    Nov 17, 2009

    Nov 17, 2009
    13,886
    14,062
    2,118
    Male
    I'm retired: every day's a Monday :P
    Manchester, TN
  18. jmar

    jmar Nexican
    Rank:
    None
    Points:
    523
    Posts:
    4,850
    Joined:
    Sep 27, 2010

    Sep 27, 2010
    4,850
    3,131
    523
    Male
    Sales
    San Jose, CA
    You know which app is better on Android than iOS?

    Tapatalk!

    The horror!
     
  19. EarlyMon

    EarlyMon The PearlyMon
    VIP Member
    Rank:
    None
    Points:
    5,218
    Posts:
    57,591
    Joined:
    Jun 10, 2010

    Jun 10, 2010
    57,591
    70,376
    5,218
    New Mexico, USA
  20. BabyBlues

    BabyBlues Trouble Just Finds Me!
    Thread Starter
    Rank:
    None
    Points:
    1,333
    Posts:
    13,125
    Joined:
    Jun 3, 2010

    Jun 3, 2010
    13,125
    9,766
    1,333
    Female
    Masquerading as a responsible adult
    Jersey - born & bred
    What's funny is I hate the new tapatalk on android but like it on iOS. :eek::D
     
  21. MSUgEEk

    MSUgEEk Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    3,696
    Joined:
    Apr 22, 2010

    Apr 22, 2010
    3,696
    1,418
    313
    Electrical Design Engineer
    Northwestern Alabama
    I work at a 3 unit site ;)
     
  22. AntimonyER

    AntimonyER CHANGED FROM AF ADDICT MIKESTONY
    Rank:
    None
    Points:
    1,343
    Posts:
    13,644
    Joined:
    Jun 18, 2010

    Jun 18, 2010
    13,644
    8,004
    1,343
    Statesboro, GA
    I like the old version of tt so much better. Still have it on my tablet, so I'm using that over my phone now. Would be fine if it weren't for the bug I have that I mentioned this morning.
     
  23. jmar

    jmar Nexican
    Rank:
    None
    Points:
    523
    Posts:
    4,850
    Joined:
    Sep 27, 2010

    Sep 27, 2010
    4,850
    3,131
    523
    Male
    Sales
    San Jose, CA
    Maybe I like it on Android better cos I'm using it on my Nexus 7 instead of a phone? I bet it is nice on that iPad of yours, eh?

    Edit: slightly ninja'd by Anti!
     
  24. BabyBlues

    BabyBlues Trouble Just Finds Me!
    Thread Starter
    Rank:
    None
    Points:
    1,333
    Posts:
    13,125
    Joined:
    Jun 3, 2010

    Jun 3, 2010
    13,125
    9,766
    1,333
    Female
    Masquerading as a responsible adult
    Jersey - born & bred
    It is. I could never go to iPhone but for tablets I'm ok on apple stuff
     
  25. DarthSilentBob

    DarthSilentBob Well-Known Member
    Rank:
    None
    Points:
    53
    Posts:
    168
    Joined:
    Dec 2, 2011

    Dec 2, 2011
    168
    87
    53
    Male
    Tornado Alley
    I use the new Tapatalk on my Note 2 and 2013 Nexus 7. It's MUCH nicer on the tablet than the phone. Seems like they put more effort into the tablet interface... Just IMO
     

Share This Page

Loading...