From: Kevin Butler [mailto:email@example.com]
Sent: den 31 januari 2002 01:29
To: Örjan Reinholdsen
Subject: Re: [Jython-dev] Jython and SAX
Örjan Reinholdsen wrote:
> When I run the following script with jython
> from xml import sax
> xmlParser = sax.make_parser()
> it takes somewhat 15 sec. to complete. Subsequent calls to
> 'make_parser' are blazing fast (cached I guess). Is this
> resonable or is there something I could do to shorten this
> rather anoying wait? Trying the same trick with (C) Python
> takes only 1-2 secs.
If you have write access to the Lib/xml/* subdirectories, the first time you did it, it should have cached .class files to accelerate loading the files in future invocations of the interpreter.
The first time I imported it, it took ~15 seconds, subsequent calls were fast.
Exit, restart jython, import, make_parser took ~2 seconds.
Exit, remove all .class files under xml, and it takes 15 again...
> Another thing, is there a way to use some of the
> state-of-the-art XML parsers written in Java (like Crimson)
> with the Jython SAX API's (without reinventning the wheel)?
Don't know. :-)