[Mono-list] XML / XPaths Very Slow Compared to MS C#
Bradford Stephens
bradfordstephens at gmail.com
Wed Sep 10 17:19:37 EDT 2008
Thanks, I appreciate it. This has the team stumped :)
On Tue, Sep 9, 2008 at 6:10 PM, Atsushi Eno <atsushi at ximian.com> wrote:
> Hello,
>
> That's interesting. If I have enough time I'll check what are likely
> culprits with modified version of the cases and possibly fix them.
>
> Atsushi Eno
>
> Bradford Stephens wrote:
>>
>> Hello all,
>>
>> It seems that XPath selection is several orders of magnitude slower in
>> Mono 2.0 on Ubuntu than on C# on Windows XP.
>>
>> The example below is pretty straightforward, and doesn't seem like
>> it's much slower, but we do this millions of times a day. In some
>> cases, I've seen parsing a document go from 10 ms on Windows to over
>> 2000 ms on Mono 2.0/Linux.
>>
>> I've made a Mono Project to let you test it yourselves:
>> http://www.giborama.com/TestSlowXML.tar
>>
>> I've advocated the switch of our company's platform from Windows to
>> Linux, but XML/XPath is an essential part of the business, and with it
>> being so slow, we're dead in the water.
>>
>> I would greatly appreciate any help you may have :)
>>
>> ~~~~
>>
>> Windows XP / C# 2005:
>>
>> Xpath: //head/title took 2
>> Xpath: //div[@id= 'content']/div[starts-with (@id, 'p')] took 0
>> Xpath: .//h2/a took 0
>> Xpath: .//p[@class= 'byline']/a[position()=1] took 0
>> Xpath: .//p[@class= 'byline'] took 1
>> Xpath: .//h2 took 0
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')] took 0
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')]//img took 0
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')]//a took 0
>> Xpath: //p[@class= 'paging']/a[@class= 'alignright arrowforward'] took 0
>>
>>
>> Ubuntu / Mono 2.0:
>>
>> Xpath: //head/title took 24
>> Xpath: //div[@id= 'content']/div[starts-with (@id, 'p')] took 8
>> Xpath: .//h2/a took 1
>> Xpath: .//p[@class= 'byline']/a[position()=1] took 5
>> Xpath: .//p[@class= 'byline'] took 3
>> Xpath: .//h2 took 1
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')] took 5
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')]//img took 5
>> Xpath: .//div[@class= 'post']/div[starts-with (@id, 'pc')]//a took 5
>> Xpath: //p[@class= 'paging']/a[@class= 'alignright arrowforward'] took 8
>>
>> Cheers,
>> Bradford
>> _______________________________________________
>> Mono-list maillist - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
>
More information about the Mono-list
mailing list