Re: [xml] Extending XPath?

Date view Thread view Subject view Author view

From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: Sat Oct 14 2000 - 11:39:26 EDT


Daniel Veillard wrote:

> - this introduce a binary incompatible change, some data
> structures are changed and that a first thing I will have
> to correct

Why is binary compatibility an issue?

> - an hash table only makes sense if the pool of object is
> clearly larger than the number of entries, and whatever how I
> turn the problem, I don't see how i would need to register
> 250 functions, if you have such an use case please enlighten me

Let me reiterate, the number is arbitrarily chosen. Change it to
whatever pleases you.

> - the function used to compute the hash looks rather costly
> you have a multiply and an add per char in the string, I
> usually simply compute the sum of all chars in the string
> which for a 256 hash size should be good enough.

I use a standard hash key computation algorithm. If you disapprove
of it, change it (if you feel the distribution of your algorithm is
good enough). I don't see the issue here.

> - the overall memory used for storing the hash table seems a
> bit inappropriate in that specific case of the few XPath
> functions (but tiny compare to a DOM tree size and other use
> of hash tables in libxml).

As you mention, the size of the hash table is neglible compared to
the size of the parse tree. We are talking peanuts here. Again, I
don't see the issue here.

> - adding a new header and C file would only really make sense if
> those were reused in multiple places.
>
> I think integrating the patch as is is a bit problematic right now.
> But I think it does make sense to try to reuse it to make it the
> hash table interfaces used in other parts as well (entities, element/
> attributes/notations declarations, and the XPath registry).

This was exactly the reason why I made the hash functions generic,
and put them in separate files (well, this and the good software
engineering practice of modulability).

> I hope that you won't take offense if I don't integrate it for
> 2.2.5, I think I will reuse it but as explained in a larger context :-)

Well, I was only trying to be helpful. I do not take personal
offence, but I will, in all likelihood, be more cautious with
future submissions.

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Oct 14 2000 - 11:43:28 EDT