How to reduce execution time in Android

Discussion in 'Application Development' started by marinajogy, Feb 3, 2013.

  1. marinajogy

    marinajogy Member
    15

    Jan 7, 2013
    10
    0
    15
    I am using Eclipse for Android development
    and Latest version of Android SDK (Running XP, 2Gb Ram)

    1. when run clicked, previously executed emulator appears first
    then emulator default screen appears, only last current actual output appears

    2. when clicked to close takes too much time (2 mns) for the emulator to disapper

    3. in short execution time exceeds development/coding time in the testing process

    is anyway to reduce such execution time


    thnks in advance
     

    Advertisement
  2. Unforgiven

    Unforgiven -.. --- - / -.. .- ... ....
    Moderator
    9,128

    Jun 23, 2010
    32,347
    30,455
    9,128
    Male
    Douglas, MA
    Welcome to Android Forums marinajogy.:)

    I moved this to the Application Development forum to get some better eyes on it.
     
  3. cryofy

    cryofy Member
    16

    Feb 1, 2013
    21
    2
    16
    @marinajogy

    Do you run a new emulator every time you test a piece of code and once your testing is complete you close the emulator? In the next testing iteration you do the same again (new emulator, test, close emulator).

    Is that how you currently do it?
     
  4. marinajogy

    marinajogy Member
    15

    Jan 7, 2013
    10
    0
    15
    ya, emulator is closed after one run
    (new emulator, test, close emulator). yes

    what is the best mehod
     
  5. cryofy

    cryofy Member
    16

    Feb 1, 2013
    21
    2
    16
    You don't need to close the emulator, every time you test some piece of code. Just start one emulator instance then check if it's properly listed under the Eclispe device list. If it's not, go to the command line and write "adb kill-server" and then "adb start-server".
    Now if you want to test some code, hit the run button in Eclipse, test your code and don't close the emulator afterwards, just let this one emulator instance open. Next time you test some code, there's no need to start a new instance, Eclipse will automatically use the existing one and it will take only little time to upload and rund your apk.

    If you have a cpu capable of x86 virtualization, for newer intel i-5 & i-7 cpus this is called vt-d, you can use Intel HAXM to greatly speed up your emulator.

    Cheers
     
  6. marinajogy

    marinajogy Member
    15

    Jan 7, 2013
    10
    0
    15
    If it's not, go to the command line and write "adb kill-server" and then "adb start-server".

    pl let me know, what this commands doing
     
  7. cryofy

    cryofy Member
    16

    Feb 1, 2013
    21
    2
    16
    Adb is the Android Debug Bridge, see Android Debug Bridge | Android Developers. It's a command line tool that lets you communicate with an emulator instance or connected Android-powered device, it's bundled with the android sdk and you find it in your android-sdk\platform-tools directory.

    You can check listed devices via the 'adb devices' command. If you start a new emulator, and it is not listed here, 'adb kill-server' & 'adb start-server' should help.
     
  8. marinajogy

    marinajogy Member
    15

    Jan 7, 2013
    10
    0
    15
    I typed adb kill-server coman in command prompt
    but got tyhe msg bad command or file name
     
  9. cryofy

    cryofy Member
    16

    Feb 1, 2013
    21
    2
    16
    The 'android-sdk\platform-tools' direcotory, which contains the adb executable needs to be set in the PATH variable of your os, see How do I set or change the PATH system variable?, if you want to access is from every direcotry on your command line. Otherwise it's only 'accessible' from within the above directory.
     

Share This Page

Loading...