Bug 34805

Summary: [V8] Perf regression in V8DOMWrapper::instantiateV8Object()
Product: WebKit Reporter: Nate Chapin <japhet>
Component: WebCore Misc.Assignee: Nate Chapin <japhet>
Status: RESOLVED FIXED    
Severity: Normal CC: antonm
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch dglazkov: review+

Description Nate Chapin 2010-02-10 10:41:47 PST
I introduced a performance regression in http://trac.webkit.org/changeset/54499.

It can be fixed by providing a split similar to what had existed previously: one path for objects that might be constructed in a WorkerContext, and a fast path for objects that are never in a WorkerContext.
Comment 1 Nate Chapin 2010-02-10 11:24:23 PST
Created attachment 48512 [details]
patch

Performance on the DOM benchmark suite with this patch is comparable to a build with 54499 reverted, and dromaeo performance appears to be slightly better.
Comment 2 anton muhin 2010-02-10 11:33:37 PST
Thanks a lot, Nate.

Only one thing---instantiate in worker context tells me that it must be a worker context, however it looks like it's possibly a worker context.

If it's correct, could you give some other name.  The ugly idea I have is in possible worker context.
Comment 3 Nate Chapin 2010-02-10 11:37:49 PST
(In reply to comment #2)
> Thanks a lot, Nate.
> 
> Only one thing---instantiate in worker context tells me that it must be a
> worker context, however it looks like it's possibly a worker context.
> 
> If it's correct, could you give some other name.  The ugly idea I have is in
> possible worker context.

Yeah, I debated the name.  Perhaps instantiateV8ObjectMaybeInWorkerContext?
Comment 4 anton muhin 2010-02-10 11:38:59 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Thanks a lot, Nate.
> > 
> > Only one thing---instantiate in worker context tells me that it must be a
> > worker context, however it looks like it's possibly a worker context.
> > 
> > If it's correct, could you give some other name.  The ugly idea I have is in
> > possible worker context.
> 
> Yeah, I debated the name.  Perhaps instantiateV8ObjectMaybeInWorkerContext?

Yep, something like that.  Thanks.
Comment 5 Dimitri Glazkov (Google) 2010-02-11 09:34:33 PST
Comment on attachment 48512 [details]
patch

ok. I was so happy for this code to be gone. Oh well.
Comment 6 Nate Chapin 2010-02-12 10:30:02 PST
http://trac.webkit.org/changeset/54680