Re: [Rd] Creating XML document extremely slow

2012-02-15 Thread Friedrich Leisch
> On Fri, 10 Feb 2012 13:18:38 +0100, > Titus von der Malsburg (TvdM) wrote: > Hi list, > I'm using the package XML to create a simple XML document. > Unfortunately constructing the XML tree is extremely slow. My code > (see below) adds only about 100 nodes per second on an Intel

Re: [Rd] Creating XML document extremely slow

2012-02-10 Thread Titus von der Malsburg
On Fri, Feb 10, 2012 at 6:43 PM, Milan Bouchet-Valat wrote: > Doesn't sound so bad to me. I don't think you'll find a use case where > 3s will really be a problem. Actually I have exactly such a case because I have to produce many such documents and a difference of two orders of magnitude in proc

Re: [Rd] Creating XML document extremely slow

2012-02-10 Thread Milan Bouchet-Valat
Le vendredi 10 février 2012 à 17:36 +0100, Titus von der Malsburg a écrit : > On Fri, Feb 10, 2012 at 2:10 PM, Milan Bouchet-Valat > 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

Re: [Rd] Creating XML document extremely slow

2012-02-10 Thread Titus von der Malsburg
On Fri, Feb 10, 2012 at 2:10 PM, Milan Bouchet-Valat 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).

Re: [Rd] Creating XML document extremely slow

2012-02-10 Thread Milan Bouchet-Valat
Le vendredi 10 février 2012 à 13:18 +0100, Titus von der Malsburg a écrit : > Hi list, > > I'm using the package XML to create a simple XML document. > Unfortunately constructing the XML tree is extremely slow. My code > (see below) adds only about 100 nodes per second on an Intel i5 > machine.

Re: [Rd] Creating XML document extremely slow

2012-02-10 Thread Titus von der Malsburg
On Fri, Feb 10, 2012 at 1:40 PM, Friedrich Leisch wrote: > Have you considered simply writing the XML using standard functions > like cat() and friends? That can be much faster than creating an XML > object and writing that out (have just done that to write exams into > our e-learning platform via