[Ironpython-users] running asciidoc

Pawel Jasinski pawel.jasinski at gmail.com
Wed Apr 23 10:48:57 CEST 2014


On Wed, Apr 23, 2014 at 9:34 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Wed, Apr 23, 2014 at 6:14 AM, Pawel Jasinski
> <pawel.jasinski at gmail.com> wrote:
> > asciidoc calls frequently re.compile.
> > In case of cpython re.compile uses cache, where ironpython performs
> compile
> > unconditionally.
> > https://ironpython.codeplex.com/workitem/35146
>
> Why would it repeatedly call compile? The point of compile is that it
> should only be called once and then the result re-used.
>
> - Jeff
>

I have no idea. It doesn't look right.
Sometimes it has the same pattern for different macros, so there is a valid
reason to do so, but in general it is almost always blindly calling compile
before any evaluation.

There is something else I have noticed.
cpython always compiles. Ironpython compiles only if compile is called.

The patch I have submitted (https://github.com/IronLanguages/main/pull/191)
is trying to be clever about it.
Any direct method does cache, but it does not compile (compile is
expensive, I learned it hard way :-)
Compile does cache, but if the cached version is not compiled, it gets
replaced with compiled one.

asciidoc running with patched version of ironpython performs reasonably.


--pawel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140423/91359975/attachment.html>


More information about the Ironpython-users mailing list