The Artima Developer Community
Sponsored Link

Python Buzz Forum
libxml2 - so damn fast

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Victor Ng

Posts: 112
Nickname: victorng
Registered: Aug, 2003

Victor Ng programs Python for money, but he'd be programming Python anyway if he was a bum.
libxml2 - so damn fast Posted: Feb 2, 2004 10:57 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Victor Ng.
Original Post: libxml2 - so damn fast
Feed Title: Victor Ng's Weblog
Feed URL: https://blog.crankycoder.com/feed/atom/
Feed Description: Python Feed
Latest Python Buzz Posts
Latest Python Buzz Posts by Victor Ng
Latest Posts From Victor Ng's Weblog

Advertisement

I'm having a love/hate relationship with libxml2 right now.

I'm currently facing the job of repeatedly parsing multiple XML documents that are around 9-12 MB is size. Don't ask who's creating them - it only makes me angry.

Anyway - PyXML seems to choke on files this size. Memory usage goes through the roof (I killed Python when it hit 400+MB) and it's just too dang slow.

Enter libxml2 from the GNOME folks.

Parsing a 10MB XML file on the Powerbook takes about 4 seconds. XPath queries are a little wonky in Python still - doc.xpathEval("//FOO") doesn't seem to work, but doc.xpathEval("//*[name()='FOO']") does.

Weird.

Anyway - each bit of the Python bindings for libxml2 API I figure out is followed by both elation (ooh - so fast....) and irritation (why isn't this documented better?).

I'm going to have to see if there's a way to generate a comprehensive API docs for this thing.

Read: libxml2 - so damn fast

Topic: MAC address normalizer: Now with string iteration and 100% less regexes! Previous Topic   Next Topic Topic: .NET linker

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use