From malsburg at gmail.com  Fri Feb 10 17:36:45 2012
From: malsburg at gmail.com (Titus von der Malsburg)
Date: Fri, 10 Feb 2012 17:36:45 +0100
Subject: [Rd] Creating XML document extremely slow
In-Reply-To: <1328879419.2325.8.camel@milan>
References: <CAM+LvrA9pWspU2qTMf4dJTbxFZzS9waDLTbHtHU=0GiJYwD4dA@mail.gmail.com>
	<1328879419.2325.8.camel@milan>
Message-ID: <CAM+LvrAY7OCUOk8fZyBmQw+ZnA4U296Q84MLA4nVLCKyrA6Lgg@mail.gmail.com>

On Fri, Feb 10, 2012 at 2:10 PM, Milan Bouchet-Valat <nalimilan at club.fr> wrote:
> Le vendredi 10 f?vrier 2012 ? 13:18 +0100, Titus von der Malsburg a
> ?crit :
> Just a guess, but I'd try creating all 'Marker' nodes first, storing
> them in a 'markers' list, and then calling addChildren(markernode,
> kids=markers).

A good guess.  I changed the code according to your suggestion and it
reduced the processing time from ~25 to ~3 seconds.  Better but still
ridiculously slow.  When I generate the same XML document by
concatenating pre-fabricated strings, as suggested by Friedrich, the
whole process takes just 10 ms according to system.time.

 Titus



[Rd] Creating XML document extremely slow
Titus von der Malsburg