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)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: gal, Assigned: gal)
References
Details
Attachments
(1 file, 1 obsolete file)
2.31 KB,
patch
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → gal
Assignee | ||
Comment 2•14 years ago
|
||
The patch requires all JITs to be off.
Assignee | ||
Comment 3•14 years ago
|
||
Nice. The attached patch makes apple gcc consume 8GB of memory as it iloops. Thanks apple.
Assignee | ||
Comment 5•14 years ago
|
||
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
Assignee | ||
Comment 6•14 years ago
|
||
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.
Comment 7•9 years ago
|
||
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
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•