XML::Simple

Dirk Koopman djk at tobit.co.uk
Wed Jan 11 23:40:18 GMT 2006


Seems to be my week for asking XML questions..

I am using XML::Simple for a project that requires very simple
(fragments of) xml. An example would be:-

<ping id="22" o="GB7DJK-1" s="1" t="11T232023" to="GB7TLH"
u="GB7DJK-1" />

They are all of this form currently, but in time may incorporate one
level of children something like:-

<node id="1" o="GB7DJK" t="11T192301" v="1.52" b="60.450" h="1">   
  <user o="G1TLH" t="20051213T082110" h="1" />
  <user o="G7BRN" t="08T140156" h="1" />
</node> 

This is all very well and all works more or less for my purposes. My
problem is that it is so slooooooow. The "ping" example takes around
750mS just to parse the xml. This is compared to the non xml sentence
that it replaces, where the total round trip time on the same software,
hardware and network, and in including all the processing, is of the
order of about 0.10 seconds. If you include the ping and the pong, I get
round time times of around 1.5 seconds. 

Now I thought that XML::Simple was, by default, based on XML::Parser
which in turn is expat. Expat, I thought, is reasonably quick.

I either need some help improving the speed or use a different XML
parser but, and this is important, it must be reasonably easy for
non-programmers (that understand rpm or ppm) to install this under
Windows using Activestate perl, as well as the *nux of your choice. No
user compiling or xs modules from CPAN.

Dirk 



More information about the london.pm mailing list