From: Charles O. N. <cha...@su...> - 2006-11-16 03:24:41
|
Sorry for the dupe; I really hate mailing lists I have to "reply to all" to, because I ALWAYS forget to do so. Charlie Groves wrote: > On 11/13/06, Charles Oliver Nutter <cha...@su...> wrote: >> I appear to have a working Jython build now using Python 2.2.3 libs and >> svn trunk. Huzzah! I started up Demo/swing/Console.py...it's a bit slow >> to start, isn't it? >> >> What's that package-mgr doing? Something funky in Jython for pulling in >> system jars? > > That's most likely related to your slow startup of > Demo/swing/Console.py. We index all of the jars on the classpath the > first time they're seen so we can handle things like importing a > package or all classes from a package. Oti has done some work > recently to make it where we're less dependent on that, but it looks > like the Java APIs for classpath inspection are too restrictive to let > us get away from it entirely. It doesn't seem like it's possible to > ask java if a particular package exists, or what classes are in a > package, only if it can find a particular package. The index is > cached for subsequent invocations though so it should start up more > quickly now. We have the same issue trying to look up classes from packages, but we avoid doing any sort of indexing (though we might be interested in your algorithm). We just add the packages dynamically do the current namespace and do a search through them when looking up classes from then on (at least until we find and bind the class into that namespace). It's not exactly the best performing, but I'm not sure indexing all jars is worth the hit either. Perhaps there's some middle ground possible. >> Anyway, I'm up and running. Are there benchmarks? Built-in test cases? > > I know you can run pystone as a benchmark, but I've never done it > myself. The suite of Python std lib tests are copied into > dist/Lib/test as part of the ant build process. Running regrtest.py > in there tries all of those tests. There are also the Jython specific > bugtests which aren't in the base jython directory. You can check > them out from http://svn.sourceforge.net/svnroot/jython/trunk/bugtests > There's a README.txt in there that explains the somewhat convoluted > steps necessary to run them. I think there's some documentation of > this(and dev setup in general) in the wiki at > http://wiki.python.org/jython but it appears to be down at the moment. Ok, if I get a chance I'll start playing with some of those tests. A related question: Is it unreasonable to try to just make the jump to Python 2.4 or 2.5 right now (or perhaps immediately after you get a release out)? I assume there's probably many things that have changed, many that are new, but it would probably invigorate the Jython world to know that progress was being made toward compatibility with *current* Python, rather than a version several years old. -- Charles Oliver Nutter, JRuby Core Developer Blogging on Ruby and Java @ headius.blogspot.com Help spec out Ruby today! @ www.headius.com/rubyspec he...@he... -- cha...@su... -- Charles Oliver Nutter, JRuby Core Developer Blogging on Ruby and Java @ headius.blogspot.com Help spec out Ruby today! @ www.headius.com/rubyspec he...@he... -- cha...@su... |