Opened 10 years ago

Closed 10 years ago

#10269 closed enhancement (duplicate)

dojox.gfx SVG backend optimization

Reported by: opichals Owned by: Eugene Lazutkin
Priority: high Milestone: future
Component: DojoX GFX Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

With the following patch we could get one less code line on the svg.js rendering backend. The appendChild() itself is done in the this.add() method called just a couple of lines below (in the code branch for the shapes which don't have any parent).

--- svg.js	(revision 20722)
+++ svg.js	(working copy)
@@ -647,7 +647,6 @@
 			node = _createElementNS(svg.xmlns.svg, shapeType.nodeType);
 
 			cshape.setRawNode(node);
-			this.rawNode.appendChild(node);
 			shape.setShape(rawShape);
 			this.add(shape);
 			return shape;	// dojox.gfx.Shape

Change History (3)

comment:1 Changed 10 years ago by opichals

This patch makes dojox.gfx also almost usable with the svgweb project. There were a lot of duplicated elements added (because of svgweb still doesn't handle appendChild() of the same node well http://code.google.com/p/svgweb/issues/detail?id=296).

We can still safely remove this duplicate appendChild() from gfx code and possibly improve performance in all browsers.

comment:2 Changed 10 years ago by Eugene Lazutkin

Description: modified (diff)
Milestone: 1.4future
Status: newassigned
Type: defectenhancement

The line in question was added on purpose because some browsers were "loosing" node properties and node children when adding to the DOM tree. We need to retest all supported browsers to see if this is still the case.

This ticket does not fixes a bug that affects functionality or performance in any significant way, so technically it is not a "defect". Most probably we can qualify it as an "enhancement".

Additionally you should raise this issue with svgweb --- bugs should be fixed where they are introduced, not in all potential clients.

comment:3 Changed 10 years ago by Chris Mitchell

Resolution: duplicate
Status: assignedclosed

Dup of 9948 (already included in that patch)

Note: See TracTickets for help on using tickets.