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

Music hiccups when there is ANY change in network coverage.

Discussion in 'Android Devices' started by Jakko, Feb 21, 2010.

  1. Jakko

    Jakko Lurker
    Thread Starter
    5

    Feb 21, 2010
    7
    0
    5

    Advertisement

  2. jasonb1985

    jasonb1985 Android Expert
    98

    Jan 5, 2010
    987
    67
    98
    Radio Shack
    the hiccups in the audio are from the Dalvik virtual machine doing it's garbage collection. it's just how linux works, no way around it. yes it's annoying but it is what it is. download a program that shows you logcat in real time and you'll see what i mean.

    everytime you hear a hiccup you'll see it say "dalvikvm: GC freed xxxx objects / xxxx bytes in xxx ms".
     
  3. Jakko

    Jakko Lurker
    Thread Starter
    5

    Feb 21, 2010
    7
    0
    5
    Does this mean it also worked like this on all android devices before droid/milestone? I do not remember such a thing with my g1.
     
  4. jasonb1985

    jasonb1985 Android Expert
    98

    Jan 5, 2010
    987
    67
    98
    Radio Shack
    android is linux and this is just a side effect of linux. because it is always multitasking it is also doing very frequent garbage cleanups to free memory back up.

    i am not saying that it doesn't also hiccup when changing from 1x to 3g or whatever like you are saying. that may be true, but most of the hiccups you are hearing are probably from the virtual machine doing very slight pauses when clearing old data. the virtual machine has to very quickly pause every other process that is going on when it does it's garbage cleanup. usually it's a fraction of a second, could be as quick as 50ms (maybe even quicker) and could also be upwards of 250ms. a 250ms pause is only 1/4 of a second, but you'll definitely notice that.

    after i realized what was causing this and that it's never going to go away i just got used to it. i barely even notice it anymore.
     
  5. Jakko

    Jakko Lurker
    Thread Starter
    5

    Feb 21, 2010
    7
    0
    5
    Just to be clear, I do not notice any hickups whatsoever when flightmode is turned on, regardless of what I do in android. (open applications)
    And every single time a connection drops or is re-established there is a hickup.
    Does this mean garbage collection only occurs when connection-related changes happen?
     
  6. jasonb1985

    jasonb1985 Android Expert
    98

    Jan 5, 2010
    987
    67
    98
    Radio Shack
    no.

    most of the garbage collection cycles are to small to notice. some of the larger ones take more time and cause noticeable hiccups in the audio. the larger ones are pretty rare though.
     
  7. Jakko

    Jakko Lurker
    Thread Starter
    5

    Feb 21, 2010
    7
    0
    5
    According to some droid users I talked to, this is not an issue on the droid. Which is strange, does the droid not collect garbage?
     
  8. Jakko

    Jakko Lurker
    Thread Starter
    5

    Feb 21, 2010
    7
    0
    5
    So do droid users not visit these forums or is there noone willing to test this issue on their droid?
     
  9. alostpacket

    alostpacket Over Macho Grande?
    513

    Nov 29, 2009
    7,973
    3,603
    513
    Android App Developer
    NY
    Dalvik is pretty aggressive in gc it seems. But that seems like a dalvik issue not Linux, no?
     
  10. jasonb1985

    jasonb1985 Android Expert
    98

    Jan 5, 2010
    987
    67
    98
    Radio Shack
    dalvik... linux... whatever. lol either way the droid is almost constantly doing garbage collection.
     
  11. alostpacket

    alostpacket Over Macho Grande?
    513

    Nov 29, 2009
    7,973
    3,603
    513
    Android App Developer
    NY

    Indeed. I'm looking forward to it being more optimized. I'd really like them to removed the damn log messages too heh.
     
  12. homeopt

    homeopt Lurker
    5

    Dec 6, 2010
    1
    0
    5
    I've only noticed the problem when I've lost data connection. Not sure if the analysis about garbage collection is accurate.
     

Share This Page

Loading...