Novice to development. Apps run very slow...


Last Updated:

  1. caiel

    caiel Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    8
    Likes Received:
    0
    Hello,

    This is the first time I am developing on a linux box.

    Specs:
    Ubuntu 8.04 - the Hardy Heron
    Linux matrix 2.6.24-26-generic #1 SMP Tue Dec 1 18:37:31 UTC 2009 i686 GNU/Linux

    When I run the android examples ( .../android-sdk-linux_86/platforms/android-2.0.1/samples), or even the "hello world", it takes a very long time for the AVD to show the application. I am talking about 10 minutes or around 10 minutes

    The response times are very slow.

    Is this related to my linux environment.

    Is there any way I can make the applications open faster ?

    I am not an expert on linux administration. Can anybody let me know any basic maintenance tasks that has to be done.

    Thanks a lot!

    Srinivas
     

    Advertisement
  2. starwed

    starwed New Member

    Joined:
    Jan 20, 2010
    Messages:
    1
    Likes Received:
    0
    I have the same problem. (I'm running Ubuntu 9.10 on an eeePC.) Trying to get the hello world to run, it takes a really, really, long time for the AVD to become responsive.

    Are there any specific AVD settings that might help with this? Or is it just futile to try android development on a 1.6 GHz netbook?
     
  3. sn00zer

    sn00zer Member

    Joined:
    Dec 30, 2009
    Messages:
    17
    Likes Received:
    0
    I think that running the emulator on a netbook is probably not a great idea. While it may run it will be VERY slow especially if you're using the eeePC that only has 1GB of RAM.

    As far as linux goes I develop using Ubuntu and don't seem to have a problem with it. My laptop also has 4GB of RAM. It does run a lot slower on my laptop than it does on my desktop(8GB RAM).

    The emulator just seems to be slow in general. The best solution I've found is to develop/test/debug on an actual device. It is WAY faster than the emulator.
     
  4. tliebeck

    tliebeck VIP Member VIP Member

    Joined:
    Dec 6, 2009
    Messages:
    211
    Likes Received:
    123
    Upgrading from a 2.4GHz P4 to a 2.93GHz Core 2 Duo cleared this same problem up for me. The (ancient) old machine (which was running 9.04) was plenty fast for general-purpose Java/web software development, but I'd see "Force Close/Wait" warnings quite frequently from the emulator.

    Even with the new machine, I still prefer developing with a real device vs. an emulator. The emulator still takes two minutes to cold boot.

    If you're stuck with an eeepc for development, definitely do all your testing on-device except where required (i.e., version testing).
     
  5. caiel

    caiel Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    8
    Likes Received:
    0
    You just hit the right note, by telling exactly what I am facing right now with the emulator, "force close/wait" all the time. After waiting more than 10 minutes for the emulator to show the app. I have 2GB RAM on my ubuntu

    $free
    total used free shared buffers cached
    Mem: 2067600 815984 1251616 0 26268 328404
    -/+ buffers/cache: 461312 1606288
    Swap: 0 0 0


    So what do you mean by developing with the real device ?

    I have a droid phone. I cannot risk this device, as I am depending on it for many things. Can I buy this "real device" cheap, just for testing purpose, boundry case testing (which would be sometimes fatal).

    Infact I have not thought much about any ideas yet, for development. So far I just used delivered samples...

    Thanks a lot for your replies!

    Srinivas
     
  6. tliebeck

    tliebeck VIP Member VIP Member

    Joined:
    Dec 6, 2009
    Messages:
    211
    Likes Received:
    123
    Real device = running app on real device. Android Eclipse plug in will automatically push the built apk to the device and start the default activity. It works great.

    Running your app straight from the device isn't all that dangerous. I too have a Droid and main dev machine is Ubuntu...haven't blown anything up yet.

    Just follow the directions here: Developing on a Device | Android Developers
    (Make sure you change the vendor id to that of your phone as discussed on that page).

    Or you can pick up someone's old G1 for $150 or so off Craigslist.
     
  7. caiel

    caiel Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    8
    Likes Received:
    0
    Not sure if I can get G1 off of craigslist for $150, but would you think buying more RAM(make it 4 GB or more, <$150 ), would make the emulator faster ? ( atleast as fast as real device )...

    I am very new to android, so can you please let this noob know, where to start or what to develop...

    I was reading in the google android challenge where 100's of thousands of apps are already out...

    So what would be the right niche to go for ? like would it be games, or enterprise solutions, ? My full time job consists of supporting/developing enterprise applications.., so would it be too ambitious if I say I could build interfaces on android that connect to these enterprise systems ?

    Thanks

    Srinivas
     
  8. tliebeck

    tliebeck VIP Member VIP Member

    Joined:
    Dec 6, 2009
    Messages:
    211
    Likes Received:
    123
    Memory only improves performance if you're running out of it. Try logging out, logging in, starting Eclipse, running emulator. If it's fast in that environment, you're low on memory. Keep a "System Monitor" widget in your panel with CPU & memory enabled. Ubuntu shouldn't be at all memory impacted with 2GB running Eclipse + Android emulator though.

    As far as apps, build what you enjoy writing/want most for yourself.

    And if you run in that emulator in your current environment, you're not going to enjoy development. Use the Droid! Go pay $8/month for Asurion insurance if you're worried about it (after your warranty expires). I've yet to fry mine or have it do anything even remotely weird, and I've literally deployed to it probably 1,000 times by now. Get the $30 dock so you don't thrash the USB port plugging it in/taking it out.
     
  9. Sanchos

    Sanchos New Member

    Joined:
    Feb 24, 2011
    Messages:
    1
    Likes Received:
    0

Share This Page

Loading...