Blog Post RSS ?

Blogs » PHP » PHP5 XML at 10Meg
 

PHP5 XML at 10Meg

by Harry Fuecks

Christian has some interesting thoughts, results and code up here, parsing a 10Mb XML document with PHP5’s XML apis. Highlights the trade off between performance and memory use when using DOM vs. Sax / XMLReader.

Personally a little surprised that XMLReader proved faster than SAX. “Pull style” XML parsers are usually implemented by “re-routing” a SAX parser and from a quick glance at the libxml2 source, it seems to do the same. I guess executing alot of callback functions at a C level is faster than executing them up at the PHP level.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

No related posts.

This post has one response so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...