Changeset 79781 in webkit
- Timestamp:
- Feb 26, 2011 5:59:36 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r79780 r79781 1 2011-02-26 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Maciej Stachowiak. 4 5 malloc in removeChildren shows up on profile of peacekeeper domDynamicCreationCreateElement 6 https://bugs.webkit.org/show_bug.cgi?id=55204 7 8 * dom/ContainerNode.cpp: 9 (WebCore::ContainerNode::removeChildren): 10 - Using an inlineCapacity of 10 for now. We may want to tweak it later. 11 - This removes yet another malloc from code which removes nodes (which is rather common). 12 1 13 2011-02-26 Eric Seidel <eric@webkit.org> 2 14 -
trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
r72833 r79781 136 136 static bool isCSSPropertyName(const Identifier& propertyName) 137 137 { 138 // FIXME: This mallocs a string for the property name and then throws it 139 // away. This shows up on peacekeeper's domDynamicCreationCreateElement. 138 140 return CSSStyleDeclaration::isPropertyName(cssPropertyName(propertyName)); 139 141 } -
trunk/Source/WebCore/dom/ContainerNode.cpp
r74101 r79781 356 356 void ContainerNode::willRemove() 357 357 { 358 NodeVector nodes; 358 Vector<RefPtr<Node>, 10> nodes; 359 nodes.reserveInitialCapacity(childNodeCount()); 359 360 for (Node* n = m_lastChild; n; n = n->previousSibling()) 360 361 nodes.append(n); … … 513 514 514 515 forbidEventDispatch(); 515 Vector<RefPtr<Node> > removedChildren; 516 Vector<RefPtr<Node>, 10> removedChildren; 517 removedChildren.reserveInitialCapacity(childNodeCount()); 516 518 while (RefPtr<Node> n = m_firstChild) { 517 519 Node* next = n->nextSibling(); 518 520 519 521 // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744). 520 522 // removeChild() does this after calling detach(). There is no explanation for
Note: See TracChangeset
for help on using the changeset viewer.