Many of those probably aren't even browser threads, but threads for Dalvik
and the application framework.  For example, here is a list of threads in my
browser:

1 7035 native 79 21 main
*2 7038 vmwait 10 0 GC
*3 7040 vmwait 0 0 Signal Catcher
*4 7041 running 0 5 JDWP
*5 7042 vmwait 13 7 Compiler
*6 7043 wait 0 0 ReferenceQueueDaemon
*7 7044 wait 0 0 FinalizerDaemon
*8 7045 timed-wait 0 0 FinalizerWatchdogDaemon
9 7046 native 0 0 Binder Thread #1
10 7047 native 0 0 Binder Thread #2
11 7057 wait 0 0 pool-2-thread-1
12 7050 native 0 0 CookieSyncManager
13 7056 timed-wait 2 0 pool-1-thread-2
14 7058 native 322 30 WebViewCoreThread
15 7053 native 2 1 BackgroundHandler
16 7054 timed-wait 0 0 pool-1-thread-1
17 7059 wait 1 0 AsyncTask #1
18 7062 native 8 1 TexturesGenerator
*19 7063 wait 10 1 Thread-183
20 7067 native 0 0 Thread-185
21 7066 native 6 0 Thread-186
22 7070 wait 10 1 AsyncTask #2
23 7074 native 18 51 Thread-188
24 7076 native 0 0 Thread-189
25 7077 wait 0 0 AsyncTask #3
26 7078 wait 10 1 AsyncTask #4
27 7079 wait 11 0 AsyncTask #5

WebViewCoreThread is I believe the main browser thread.  You can easily see
what threads are actually using CPU with "adb shell top -m 10 -t" while you
are using the browser.

On Thu, Sep 1, 2011 at 12:15 PM, Jack Harvard <[email protected]>wrote:

> Thanks for your reply. I'm on the research side, rather than development. I
> observed 17-22 threads from com.android.browser, suppose only one of those
> thread is doing the real work of rendering the page.
>
> On 31 Aug 2011, at 22:58, Dianne Hackborn wrote:
>
> > I really don't know what you are trying to get at.  As I said, as far as
> I know browser CPU use is generally pretty single-threaded -- the DOM
> rendering and JavaScript interpreter all need to run in the same thread.
>  Just creating more threads doesn't magically allow this work to be spread
> across them.
> >
> > And again, Gingerbread was not written for multi-core CPUs.  In fact if
> you try to run stock GB on a multi-core CPU you will be extremely unstable
> because there are many things not working correctly for SMP, especially ARM
> SMP.  So it doesn't make sense to ask questions about how stock GB runs on
> multi-core, because it just doesn't.
> >
> > If you are wondering about a particular phone someone has released with
> GB, you will need to talk with that manufacturer, because they will have
> needed to do some work to have GB run on a multi-core CPU.
> >
> > On Wed, Aug 31, 2011 at 2:09 PM, Jack Harvard <[email protected]>
> wrote:
> > Thanks for your reply, Dianne. If I run the Android browser as my only
> application in Gingerbread on a quad-core smartphone, and the page to be
> loaded is stored locally in memory (no network delay etc, in this case, the
> browser is single-threaded only as no network connection?), I wouldn't see
> any performance scaling (or worse, as the OS may move the threads to another
> core less busy in a circle) from a single-core smartphone, everything else
> being the same?
> >
> > On 31 Aug 2011, at 21:00, Dianne Hackborn wrote:
> >
> > > Gingerbread isn't designed for multi-core CPUs.  The browser doesn't
> try to create threads to use multiple CPUs, it creates threads to have
> multiple network connections.
> > >
> > > Besides networking, browsers are pretty intrinsically single-threaded
> anyway.  The complicated stuff all needs to run in one thread: DOM
> rendering, JavaScript, etc.
> > >
> > > On Wed, Aug 31, 2011 at 12:08 PM, Jack Harvard <[email protected]>
> wrote:
> > > I want to understand how many threads Gingerbread generates in order to
> understand how the browser performance scale with multicores? For example,
> if  "a few " means 2, that means 4 cores wouldn't scale the browser
> performance by anywhere close to 4 times. I understand that Gingerbread
> doesn't officially support SMP, sometimes browser does crash on multicore
> platforms, it's not a problem for me though.
> > >
> > > On 31 Aug 2011, at 18:57, Dianne Hackborn wrote:
> > >
> > > > Oh and Gingerbread wasn't designed to run on anything but single CPU
> systems, so that's irrelevant to the question of the base platform.  Of
> course people shipping Android modify it in various ways, and the browser is
> often one of the things they modify.
> > > >
> > > > On Wed, Aug 31, 2011 at 10:57 AM, Dianne Hackborn <
> [email protected]> wrote:
> > > > A few.  Why? :)
> > > >
> > > >
> > > > On Wed, Aug 31, 2011 at 10:40 AM, Jack Harvard <
> [email protected]> wrote:
> > > > Wondering how many threads does android browser generate? Suppose
> it's Gingerbread running on a dual-core or quad-core ARM processor.
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]
> > > > For more options, visit this group at
> > > > http://groups.google.com/group/android-developers?hl=en
> > > >
> > > >
> > > >
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > [email protected]
> > > >
> > > > Note: please don't send private questions to me, as I don't have time
> to provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Dianne Hackborn
> > > > Android framework engineer
> > > > [email protected]
> > > >
> > > > Note: please don't send private questions to me, as I don't have time
> to provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
> > > >
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]
> > > > For more options, visit this group at
> > > > http://groups.google.com/group/android-developers?hl=en
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > > http://groups.google.com/group/android-developers?hl=en
> > >
> > >
> > >
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
> > >
> > > Note: please don't send private questions to me, as I don't have time
> to provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > > http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
> >
> >
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
> >
> > Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to