[IronPython] Slow Performance of CPython libs?

Dino Viehland dinov at exchange.microsoft.com
Wed Feb 20 17:57:27 CET 2008


We've actually had this issue reported once before a long time ago - it's a very low CodePlex ID - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=651

We haven't had a chance to investigate the end-to-end scenario.  If someone could come up with a smaller simpler repro that'd be great.  Otherwise we haven't forgotten about it we've just had more immediately pressing issues to work on :(.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, February 20, 2008 5:20 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Slow Performance of CPython libs?

Birsch wrote:
> Hi - We've been using IronPython successfully to allow extensibility
> of our application.
>
> Overall we are happy with the performance, with the exception of
> BeautifulSoup which seems to run very slowly: x5 or more time to
> execute compared to CPython.
>
> Most of the time seems to be spent during __init__() of BS, where the
> markup is parsed.
>
> We suspect this has to do with the fact that our CPython env is
> executing .pyc files and can precompile its libs, while the IronPython
> environment compiles each iteration. We couldn't find a way to
> pre-compile the libs and then introduce them into the code, but in any
> case this will result in a large management overhead since the amount
> of CPython libs we expose to our users contains 100's of modules.
>
> Any ideas on how to optimize?

I think it is worth doing real profiling to find out where the time is
being spent during parsing.

If it is spending most of the time in '__init__' then the time is
probably not spent in importing - so compilation isn't relevant and it
is a runtime performance issue. (Importing is much slower with
IronPython and at Resolver Systems we do use precompiled binaries - but
strangely enough it doesn't provide much of a performance gain.)

Michael
http://www.manning.com/foord

>
> Thanks,
> -Birsch
>
> Note: we're using FePy/IPCE libs with regular IP v1.1.1 runtime DLLs
> (this was done to overcome library incompatibilities and network
> errors). However, the relevant slow .py code (mainly SGMLParser and
> BeautifulSoup) is the same.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list