Subject: | Fwd: XML::Smart -- importing tabular data |
Date: | Tue, 9 Jul 2013 07:40:42 -0400 |
To: | bug-xml-smart [...] rt.cpan.org |
From: | Tony Szaranski <tony [...] patchcord.ca> |
Hi Mr. Graciliano / Mr. Madabushi,
Please see below message which bounced when I tried to email directly.
Thanks,
Tony
Show quoted text
---------- Forwarded message ----------
From: Tony Szaranski <tony@patchcord.ca>
Date: Tue, Jul 9, 2013 at 7:32 AM
Subject: XML::Smart -- importing tabular data
To: gm@virtuasites.com.br
Hi Mr. Graciliano,
First off I would like to thank you for a very cool toolkit XML::Smart.
I recently ran into an issue trying to convert a semi-large record set
(basically tabular data) into XML and wanted to use XML::Smart for initial
XML creation and node additions further downstream in the process.
The issue I ran into, was I need to emulate the same output as I had
previously with XML::Simple, where all the tags are 'nodes'.
Basically I was importing a perl hash into XML::Smart, setting the node
using set_node() on each tag, and then exporting. I found if I called
set_node() on each row/field it was very slow. (1.6.8 and the latest 1.7.7)
See attachment (b.pl) ... time to run for 20000 'records' is:
# time perl b.pl
real 1m30.919s
user 1m29.599s
sys 0m0.144s
If I manually set the nodes on each 'record', it is much faster.
# time perl c.pl
real 0m27.866s
user 0m26.698s
sys 0m0.083s
My question is, is this likely to change (internals) so my code will break
in the future release, or is there a better way to set a default
'everything is a node' prior to creating?
Or am I approaching a big load the wrong way?
Any advise you can provide would be very helpful.
Thank you for your time.
Tony
--
Tony Szaranski, ITCP
Patchcord.ca Inc.
W: 705-223-8000
F: 705-233-8001
C: 705-475-6316
--- Making Connections
--
Tony Szaranski, ITCP
Patchcord.ca Inc.
W: 705-223-8000
F: 705-233-8001
C: 705-475-6316
--- Making Connections
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.