Closed Bug 641094 Opened 14 years ago Closed 9 years ago

measure how DOM bindings are used in practice

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gal, Assigned: gal)

References

Details

Attachments

(1 file, 1 obsolete file)

We are trying to optimize the following things: - extracting the C++ object from the JS object - indexed property access - magic named property access - lookup For this we want to get a sample of all property accesses on Dromaeo, facebook, cnn etc and for each access we need: - code location - what object the access happened on (identity, class) - property name - what object along the proto the property was found on
Attached patch measurement patch (obsolete) — Splinter Review
Assignee: nobody → gal
The patch requires all JITs to be off.
Nice. The attached patch makes apple gcc consume 8GB of memory as it iloops. Thanks apple.
Attached patch patchSplinter Review
working patch
Attachment #518855 - Attachment is obsolete: true
Blocks: 622298
INDEX is the set of all indexed property names 0..N Facebook: Property accesses: 24444 GETPROP 9273 GETELEM 1316 SETPROP 268 SETELEM Top 20 property names: 9465 className 9051 INDEX 2141 parentNode 1669 __FB_TOKEN 1218 nodeName 993 getAttribute 873 length 783 body 605 type 520 offsetHeight 410 defaultView 410 currentStyle 408 target 402 firstChild 354 Priority 323 id 311 nodeType 310 documentElement 260 _inherits_from_prototype 242 returnValue gmail: Property accesses: 40912 GETPROP 13661 GETELEM 4388 SETPROP 476 SETELEM Top 20 property names: 11757 className 11020 INDEX 2756 closure_uid_INDEXyjl1o 1507 ctrlKey 1380 Bfa 1270 clientY 1270 clientX 1149 type 1020 style 795 id 771 addEventListener 770 keyCode 763 readyState 762 metaKey 762 altKey 760 target 759 button 756 parentNode 746 shiftKey 745 state Dromaeo DOM core benchmarks: Property accesses: 3563286 GETPROP 1219713 GETELEM 307687 SETPROP 287638 SETELEM Top 20 property names: 1026835 length 910017 INDEX 644181 nodeType 614672 id 593920 testINDEX 485454 nextSibling 484800 previousSibling 244316 firstChild 201200 lastChild 163682 body 2314 nodeName 2176 jQueryINDEX 749 childNodes 635 parentNode 468 innerHTML 379 constructor 347 createElement 338 ownerDocument 266 width 264 tagName
The first thing that sticks out to me is that dromaeo doesn't represent at all what gmail and facebook do. Both use className heavily. I have a nice data set and I can analyze it pretty easily now. I will post some more analysis tonight.
I think bz has done plenty of profiling of DOM bindings in the last few years.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: