<p>It is a strange sory. The author claims to have achieved very good results using Erlang to parse a very big (35Mbyte) XML file (an Itunes Music Library file). He suggests that he uses lots of processes to do this. </p>
<p>It made me curious, and I decided to do some tests. I used my 1.7 GHz laptop with 1GB of memory, running Windows XP.</p>
<p>- Parsing an Itunes file of 4Mbyte takes about 4 seconds with the SAX parser that is the basis of Erlsom (if you let the callback function do something trivial).</p>
<p>- Parsing the file with Erlsom (which validates it against an XSD and translates it to records) takes about 5 seconds.</p>
<p>- Parsing the file with Xmerl takes about 8 seconds.</p>
<p>I found an article on parsing the Itunes library using mono <a href="http://www.xml.com/pub/a/2004/11/03/itunes.html">http://www.xml.com/pub/a/2004/11/03/itunes.html</a>). On an 800MHz powerbook parsing a 2.5Mbyte file apparently took 9 seconds, so I would say that Erlang doesn't look bad.
</p>
<p>Surprisingly, loading the file into Microsoft Internet Explorer takes more than a minute...</p>
<p>If things would scale lineary, parsing the 35Mbyte file should take about 40 to 80 seconds, which is about twice as fast as what the author of the blog claims to have achieved (on another machine, obviously, so comparing these figures may not make a lot of sense).
</p>
<p>Unfortunately, these tests fail miserably - Erlang crashes. On my machine I cannot translate a file (binary) of this size to a list. I have to say that I was a bit disappointed... Is there a way to fix this?</p>
<p>Willem. </p><br><br>
<div><span class="gmail_quote">On 6/20/07, <b class="gmail_sendername">Brad Anderson</b> <<a href="mailto:brad@sankatygroup.com">brad@sankatygroup.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I came across this blog today...<br><br><a href="http://www.sungnyemun.org/wordpress/?p=323">http://www.sungnyemun.org/wordpress/?p=323
</a><br><br>BA<br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">
http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>