RESOLVED FIXED 95739
Web Inspector: NMI: replace ObjectType enum with static const char* string identifiers.
https://bugs.webkit.org/show_bug.cgi?id=95739
Summary Web Inspector: NMI: replace ObjectType enum with static const char* string id...
Ilya Tikhonovsky
Reported 2012-09-04 05:44:05 PDT
When we go deeper into different parts of browser like skia, chromium itself etc. we can't use a single enum for all reported object types. We need a code that allows us to register object types on the fly. On the next step we will make string identifiers hierarchical like DOM, DOM.Bindings, DOM.Other etc.
Attachments
Patch (17.11 KB, patch)
2012-09-04 05:51 PDT, Ilya Tikhonovsky
no flags
Patch (15.64 KB, patch)
2012-09-04 08:21 PDT, Ilya Tikhonovsky
yurys: review+
Ilya Tikhonovsky
Comment 1 2012-09-04 05:51:45 PDT
Build Bot
Comment 2 2012-09-04 06:23:59 PDT
Yury Semikhatsky
Comment 3 2012-09-04 06:53:36 PDT
Comment on attachment 162024 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162024&action=review > Source/WebCore/inspector/MemoryInstrumentationImpl.cpp:40 > +Vector<String> WebCoreMemoryTypesImpl::registerObjectTypes(unsigned firstFreeId) I'd rather use strings instead of numbers for identifying object type. We could switch to the scheme with the type registration later if there is a noticeable performance impact. WDYT?
Early Warning System Bot
Comment 4 2012-09-04 07:11:53 PDT
Early Warning System Bot
Comment 5 2012-09-04 07:43:12 PDT
Peter Beverloo (cr-android ews)
Comment 6 2012-09-04 07:45:58 PDT
Comment on attachment 162024 [details] Patch Attachment 162024 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/13745476
Ilya Tikhonovsky
Comment 7 2012-09-04 08:12:14 PDT
(In reply to comment #3) > (From update of attachment 162024 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=162024&action=review > > > Source/WebCore/inspector/MemoryInstrumentationImpl.cpp:40 > > +Vector<String> WebCoreMemoryTypesImpl::registerObjectTypes(unsigned firstFreeId) > > I'd rather use strings instead of numbers for identifying object type. We could switch to the scheme with the type registration later if there is a noticeable performance impact. WDYT? Looks like the version which uses char* as ObjectType is 30% slower than current implementation. 990ms vs 750ms on 10m insertions with disabled visited check. I think we could use this approach as the solution because we will have simpler business logic.
Ilya Tikhonovsky
Comment 8 2012-09-04 08:21:38 PDT
Yury Semikhatsky
Comment 9 2012-09-05 02:00:30 PDT
Comment on attachment 162046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162046&action=review > Source/WebCore/dom/MemoryInstrumentation.h:53 > + static const char* Other; const char* -> ObjectType
Ilya Tikhonovsky
Comment 10 2012-09-05 02:19:28 PDT
James Robinson
Comment 11 2012-09-05 11:25:42 PDT
The "speedTest" unit test takes over 20 seconds to run on my extremely fast desktop. That's waaaaaaaaaaaaaaaaay too long for a unit test.
Note You need to log in before you can comment on or make changes to this bug.