On Tue Mar 18 12:35:50 2008, DARNOLD wrote:
Show quoted text> On Tue Mar 18 12:01:07 2008, CODECHILD wrote:
> >
> > Actually recently saw some posts of your on the net mentioning this...
> >
> > I think what you are asking for is for a version of the module without
> > the 'value', to just allow immediate traversal assuming you know what
> > you are doing. I have implemented that to some degree via a 'simplify'
> > function in the latest version, but I think you would be better off with
> > a version of my module targeted to exactly that.
> >
> > If I have time and motivation during the evenings or weekends I will go
> > ahead and create an alternate module for you.
> >
> > I assume by what you are saying you will not need attributes, mixed xml,
> > or comment nodes; you just want direct values only.
> >
> > Any recommendation on an idea of what I should call it? I would put it
> > under XML::Bare. Such as XML::Bare::Less, or XML::Bare::Direct, or
> > XML::Bare::Basic.
>
> Actually, I emailed a tarball to you (to cpan@codechild.com) with an
> implementation (plus JSON support, and some fixes for possible XS memory
> leaks). I'm attaching it to this post, so hopefully you'll get it.
> (Maybe that email address isn't valid ?)
>
> No idea what to call it, maybe XML::Bare::ToJSON if you decide to
> include the JSON stuff.
>
> Anyway, even with my hacks, its very fast (I mean *really* fast - when
> testing my hacks, I thought I had a bug that bypassed parsing cuz it
> couldn't possibly be that fast 8^), and should use less memory.
> As you may have seen at
http://www.perlmonks.com/?node_id=668445,
> its now my favorite XML processor!
The email is valid; it just gets hit with so much spam I barely if ever
go through it all. If I spot something obvious I notice it, otherwise it
is pretty much a junk bin. I will go back and look for it.
It is, as you say, stupendously fast. Even so, I should like to alter
the parser itself to not even bother storing un-needed data though for
your version. ( so that the code is a tad cleaner and people can tinker
with it more easily ) I will check out the changes you made first.
As far as memory goes, I wish there was an easy way to test how much
memory is used, but I have yet to figure out a reliable way that can be
used to compare it against other parsers.
Memory usage should be as low as possible, due to the fact that I
reference the xml file in memory directly and do not duplicate strings.
Beware using the functions that 'avoid leaks', because the way I have
things written I try not to allocate any memory via the XS code; just
make blind pointers I destroy on my own.
Internally I am up to version 0.29 by the way; so there are some other
things I may integrate with your changes to make it all up to date.