Slow Scrolling

by Al » Thu, 12 Mar 2009 07:01:07 GMT

Sponsored Links
 Hi, sometimes when I try to scroll using a scrollview (wrapped around
a textview), there will be no response. I've noticed this in both my
apps and the only common thing between them is the textview in both
apps use Spanned (SpanableStringBuilder to be exact) text. This
happens even when there is no activity on the window and no anr pops
up either.

Any idea what would be the cause?

Slow Scrolling

by AlCapwn » Thu, 12 Mar 2009 07:03:56 GMT

 Whoops, forgot to add this. When the freeze happened, I generated a
bugreport and it says this:

"main" prio=5 tid=3 TIMED_WAIT
  | group="main" sCount=1 dsCount=0 s=0 obj=0x400103e8
  | sysTid=2339 nice=0 sched=0/0 handle=-1096221588
  at java.lang.Object.wait(Native Method)
  - waiting on <0x1b6408> (a android.os.MessageQueue)
  at java.lang.Object.wait(
  at android.os.Looper.loop(
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(
  at dalvik.system.NativeStart.main(Native Method)

Not too sure why it would be wait()ing :s


Sponsored Links

Slow Scrolling

by Romain Guy » Thu, 12 Mar 2009 07:16:43 GMT

 It's waiting for events in the main events queue. That's pretty normal
to see this.

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Slow Scrolling

by AlCapwn » Fri, 13 Mar 2009 02:35:35 GMT

 Is there any way to get around the problem of it being non responsive?
The lack of feedback to the scroll attempt is very noticeable.


Slow Scrolling

by Mariano Kamp » Fri, 13 Mar 2009 06:35:54 GMT

 I vaguely remember a similar problem too. Do you also see the dreaded "You
used the BufferedReader default constructor" (something like that) message?
I had the feeling that it lead to a lot of garbage collections which would
in turn explain the unresponsiveness I suppose.
Btw. I got rid of the Spanneds and now do the actual work (in my case HTML
rendering, more exactly translating html entities to text) ahead of time.


Slow Scrolling

by AlCapwn » Sat, 14 Mar 2009 02:01:48 GMT

 n Mar 12, 10:35pm, Mariano Kamp <> wrote:

I see the message but I don't think that is the problem, I've let the
app run for 10+ mins and in that time, GC was only called about 6
times. Bear in mind, this was with an active connection to a server
and continuous update (the data was coming at a very fast rate) of the
textview with the data from the server. (The server connection runs it
in's own thread.)


Slow Scrolling

by Mariano Kamp » Sat, 14 Mar 2009 03:11:40 GMT

 hen I don't know -
But what sounds strange to me is that you get lots of input (new objects,
some of them possible get discarded very quickly during transformations?
growing the heap?) and still only have a garbage collection every 90

On Fri, Mar 13, 2009 at 7:01 PM, AlCapwn <> wrote:


Other Threads

1. Droid-Fu: A shared library for Android application developers

Hey folks,

I have been working on a utility library for Android for some while
now, and I believe it has now enough cool things to offer to make it

An introduction on my blog:

Source code is here:

There's more in the lib of course, most of which I will cover in
upcoming blog posts.

Contributions and feedback welcome!



2. How to make a listview with selectable children stop scrolling on touch event?

Hey Alexander did you ever get a solution to this i'm stuck with the
same issue damn listView will not stop on touch even tried override
the on touch event but it seems the touch event is immediately passed
to it's children form which I can not pass it back up successfully.


3. GPS on Droid issues

4. how to send image over socket, knowing its URI?

5. Task life cycle and activity launch mode question(s)

6. Is there a list of standard Intent specifications?

7. Android Jail Break Redux