Most of jython's startup overhead comes from:

-jvm startup
Did you try starting the jvm in client mode?
-initial caching of jars in your classpath bootpath
pruning your classpath does help a bit on initial runs. 
-try the openjdk 8 jigsaw preview releases
this will allow you to shrink your jvm somewhat.  Note that openjdk hotspot is slower than the oracle version.
-jvm startup memory options
a big heap slows the startup of the jre.  Small builds probably can start with less memory

HTH,

-W

On Jun 4, 2013 4:32 AM, "Emmanuel Jannetti" <emmanuel.jannetti@gmail.com> wrote:
Hi,

If I may share my experience on this (running jython 2.5.1/jdk 7).As for you, startup time is key for me. Doing some dummy measurement 
most of the time spent (as expected) seems to be the startup of the JVM. So I guess using you own interpreter won't 
change perf that much. 
I do not know who is the culprit but another point I've noticed (doing quick comparison between start time of the jython launcher and my app ) is that startup time is also impacted by the number of jars I add to the classpath.
So what I've done on my side is to shrink number of jars to the minimum and and use as much as possible lazy loading of module and Java classes.

Again, I've only did quick dummy measurement so let's way for actual jython dev guy to give you proper answer to this.

hope this helps.
EJ




On Tue, Jun 4, 2013 at 12:25 AM, Jim Purbrick <jimpurbrick@gmail.com> wrote:
I'm currently working on an open source Android build tool called Buck
which is implemented in Java and uses Python to define build rules
(https://github.com/facebook/buck)

We recently started embedding Jython in Buck to avoid relying on a
system Python and have seen performance gains for big projects which
have to parse many build files, but the Jython startup time and memory
overhead has made Buck slower for small projects.

We're currently using the JSR-223 API to embed Jython and were
wondering whether we might see performance gains by switching to using
the PythonInterpreter API and or PyObjects (as described here
http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications)

(The current embedding code can be found here
https://github.com/facebook/buck/blob/master/src/com/facebook/buck/json/BuildFileToJsonParser.java
and the Python which loads build files is here
https://github.com/facebook/buck/blob/master/src/com/facebook/buck/parser/buck.py)

Thanks!

Jim

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users