rawhide report: 20050405 changes

Daniel Veillard veillard at redhat.com
Tue Apr 5 15:04:42 UTC 2005


On Tue, Apr 05, 2005 at 10:38:36AM -0400, Konstantin Ryabitsev wrote:
> On Apr 5, 2005 10:17 AM, Daniel Veillard <veillard at redhat.com> wrote:
> >   Is that worth adding yet another XML Parser package to the distribution
> > used by a single tool ? 
> 
> Yes, I believe it is. 2-3 times faster in my book is definitely "worth it."
> 
> > Is there a compatibility layer to still use libxml2 ?
> 
> I don't mean to come across as rude, but libxml2 has a very clunky

  you are not rude, but obviously in a flamebait mode, looks not serious
rather than rude in my book.

> non-pythonic API. I'd choose cElementTree if only because I don't have
> to use MethodNamesThatStartWithCapsAgainstAllConventions(). It also

   Hum, sorry but that argument sounds silly, the code was there, i.e.
coded, working, debugged.

> has sensible error reporting

   libxml2 has extensive error reporting even at the python level.

> (i.e. not just segfault, which is not
> useful with python).

   where is the "yum segfault because of libxml2 python bindings" bug report ?

> In other words, cElementTree feels like a Python library, as opposed
> to libxml2, which is very obviously a set of bindings to a C API done
> as an afterthought.

  libxml2 is part of Fedora Core, celement tree wasn't part of Fedora Core.
We removed other components of Fedora Core because they were duplicate,
you're adding a new duplicate library in core, I don't think aesthetic
consideration are really worth it.

> > If I remember correctly, the performance problem wasn't libxml2 itself
> > but the specific usage within yum, i.e. collecting the data, libxml2 by
> > itself is parsing the megabyte sized file in less than a tenth of a second.
> 
> I believe it wasn't "within yum" it was "within python," specifically
> going from C strings to python strings, which took a lot of resources.
> That's all that matters to yum, since, well, it's written in python,
> and cElementTree outperformed libxml2 in our tests and resulted in
> much nicer code. I'm the one who did the testing and convincing, so
> all blame and hatemail should be aimed at me.

   Did you ever tried to discuss with me instead of making the decision
on your side ? I don't remember this. Only exchanges I got were with Seth
and rather positive, I remember changing stuff in the bindings to help him !

> > I'm surprized the solution ends up going to use a python specific library
> > instead of trying to find why the interface between libxml2 and yum generated
> > that problem. I don't remember you saying you would switch library as a result.
> 
> cElementTree (part of python-elementtree) is not a python-specific
> library. It's a python interface to expat, and a very well-designed
> one. It has fewer features than libxml2, for sure, but it's far more
> pleasant to use in python.
> 
> Kind regards,

  hum, no, I really took your mail as "I blame you in a non-contructive
fashion", adding "Kind regards" can in no way erase in an easy way the
feeling I got from your mail.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




More information about the fedora-devel-list mailing list