Opened 9 years ago

Closed 9 years ago

#11443 closed defect (fixed)

dijit._Widget create function calls replaceChild even if the nodes are the same

Reported by: Shane O'Sullivan Owned by: Shane O'Sullivan
Priority: high Milestone: 1.6
Component: Dijit Version: 1.5.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

In IE, calling node.replaceChild(childNode, childNode) causes a performance lag.

dijit._Widget's create() method should check for equality of srcNodeRef and domNode before replacing one with the other to speed up instantiation of widgets such as the ContentPane? which do not replace their root widgets.

Change History (4)

comment:1 Changed 9 years ago by Shane O'Sullivan

Summary: diji._Widget create function calls replaceChild even if the nodes are the samedijit._Widget create function calls replaceChild even if the nodes are the same

comment:2 Changed 9 years ago by bill

Owner: set to Shane O'Sullivan

Go for it, since you are already doing the benchmarking you can test the changes better than me.

comment:3 Changed 9 years ago by Shane O'Sullivan

(In [22754]) Refs #11443 Changes the create method to only replace the source DOM node if it is not the same as this.domNode. This improves performance in IE6 and IE7, as it is an unnecessary operation which mostly affects ContentPane? widgets. !strict

comment:4 Changed 9 years ago by Shane O'Sullivan

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.