RESOLVED FIXED 25275
use AtomicString to speed up window and document interceptors
https://bugs.webkit.org/show_bug.cgi?id=25275
Summary use AtomicString to speed up window and document interceptors
Antony Sargent
Reported 2009-04-17 16:02:47 PDT
Patch forthcoming.
Attachments
patch v1 (3.01 KB, patch)
2009-04-17 16:06 PDT, Antony Sargent
eric: review-
patch v2 (2.98 KB, patch)
2009-04-29 15:43 PDT, Antony Sargent
eric: review+
Antony Sargent
Comment 1 2009-04-17 16:06:43 PDT
Created attachment 29590 [details] patch v1
Dimitri Glazkov (Google)
Comment 2 2009-04-17 16:19:35 PDT
Comment on attachment 29590 [details] patch v1 Looks good. > + http://codereview.chromium.org/67141 Don't need Chromium review in ChangeLog, probably. Just mention it on bug.
Eric Seidel (no email)
Comment 3 2009-04-29 14:48:45 PDT
Comment on attachment 29590 [details] patch v1 WebKit uses DEFINE_STATIC_LOCAL for local statics. The Mac build will have trouble if we don't here too. // Use these to declare and define a static local variable (static T;) so that // it is leaked so that its destructors are not called at exit. Using this // macro also allows workarounds a compiler bug present in Apple's version of GCC 4.0.1. #if COMPILER(GCC) && defined(__APPLE_CC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 1 #define DEFINE_STATIC_LOCAL(type, name, arguments) \ static type* name##Ptr = new type arguments; \ type& name = *name##Ptr #else #define DEFINE_STATIC_LOCAL(type, name, arguments) \ static type& name = *new type arguments #endif
Eric Seidel (no email)
Comment 4 2009-04-29 14:49:09 PDT
cc-ing Dimitri so he can see my comments.
Antony Sargent
Comment 5 2009-04-29 15:43:47 PDT
Created attachment 29896 [details] patch v2 Switched to using DEFINE_STATIC_LOCAL. Thanks for catching this Eric!
Eric Seidel (no email)
Comment 6 2009-04-29 15:44:54 PDT
Comment on attachment 29896 [details] patch v2 Looks fine. Will land.
Eric Seidel (no email)
Comment 7 2009-04-29 15:48:36 PDT
Do we have any performance tests which show that this is actually faster? I'm going to land it as-is... but it seems this sort of change should have some perf-data associated with it.
Eric Seidel (no email)
Comment 8 2009-04-29 15:49:00 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp M WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp Committed r43022
Dimitri Glazkov (Google)
Comment 9 2009-04-30 09:48:59 PDT
Whoops. Last patch actually introduced variable redefinition. Fixing...
Dimitri Glazkov (Google)
Comment 10 2009-04-30 10:28:01 PDT
Note You need to log in before you can comment on or make changes to this bug.