[webkit-dev] ThreadIdentifier abstraction is inefficient
Anton Muhin
antonm at chromium.org
Thu Oct 29 15:10:34 PDT 2009
ens,
Somewhat aside from ThreadIdentifier.
Actually, at least for now, there should be no invocations of
WTF::currentThread() at least for the renderer---everything should run
in the same thread. Some time ago I got rid of those checks for Nodes
(see DOMDataStore::weakNodeCallback). I didn't do the same for other
types of objects as they didn't show up in the profiles.
May you tell me which test(s) you run?
And, overall, some time ago I failed to build Chromium w/ symbols (to
use Shark), may you teach me how to do that?
Thanks a lot for investigation and
yours,
anton.
On Thu, Oct 29, 2009 at 11:31 PM, Jens Alfke <snej at chromium.org> wrote:
> The implementation of the ThreadIdentifier abstraction (in
> wtf/ThreadingPthreads.cpp) is pretty inefficient. This makes calls like
> WTF::currentThread() a lot slower than you'd expect — that call is showing
> up as a hot spot in Chromium's JS/DOM bindings, believe it or not.
>
> I filed a bug on this: https://bugs.webkit.org/show_bug.cgi?id=30922
>
> My first suggestion is just to typedef ThreadIdentifier to pthread_t (if
> pthreads are in use) and avoid the need for a mapping altogether. Any reason
> this wouldn't be a good idea? (If not, I have two other suggestions in the
> bug report.)
>
> —Jens
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
More information about the webkit-dev
mailing list