Hi Daniel,

I found some time to work on a patch, and came up with a
simple (4 lines added) solution to the problem, see attachement.

The patch passes all existing tests (make runtests), but I have not
created a new test for it yet. That being said, I'd be happy to create a
test if you're interested. Are there any tests already covering
xmlTextReaderExpand()? I couldn't find any.

Another question I have is whether or not I need to make sure
node->closed is set to 0 on node creation. I'm not familar with the
libxml alloc functions - do they zero out the memory they return?

About performance: I assume that this patch does not have significant
performance implications, but if you're worried about this, it would also
be possible to set the node->closed field in xmlTextReaderEndElement()
and xmlTextReaderEndElementNs() to avoid any overhead when not
using the text reader api.

Anyway, please let me know if you like the patch and if there is anything
I can do to make you consider merging it.

Cheers,
Felix

--
Felix Geisendörfer (felixge.de)
Co-Founder, Debuggable Limited (debuggable.com <http://www.debuggable.com>)
Mobile: +49 (151) 14967823


On Mon, Aug 5, 2013 at 12:09 PM, Felix Geisendoerfer
<fe...@debuggable.com>wrote:

> On Mon, Aug 5, 2013 at 5:32 AM, Daniel Veillard <veill...@redhat.com>wrote:
>
>> Hi Felix,
>>
>
> Hi Daniel,
>
>
>> (the funny thing is that
>> they are now considered too CPU hungry, what a surprize :-)
>>
>
> Yeah, the quality of the protocols is worth a discussion itself ; ).
>
>
>> Please try to come with a patch, I can't 100% guarantee that i will
>> take it but but I promise to review it :-) Make sure 'make check' still
>> passes and that there is no regression in testlimits !
>>
>
> Ok, I'll give it a try and let you know if I come up with something.
>
>>
>> > Anyway, thank you so much for libxml2!
>>
>>   My pleasure, but i have far less time for it those days !
>>
>
> Maintaining a few (much smaller) OS project myself, I completey
> understand. Thanks
> for giving me some initial feedback on this!
>
> Cheers,
> --
> Felix Geisendörfer (felixge.de)
>  Co-Founder, Debuggable Limited (debuggable.com<http://www.debuggable.com>
> )
> Mobile: +49 (151) 14967823
>

Attachment: 0001-xmlTextReaderExpand-Return-when-node-closes.patch
Description: Binary data

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to