It's a great time to bring this up because I'm currently investigating various 
start-up time issues and trying to improve our startup time.  I'll give you a 
breakdown of what I've discovered so far:

                Various reflection that we do over types:
                                This includes over modules (SystemState, 
built-ins, re, etc...)
                                Over types for creating "DynamicType"s: object, 
string, PythonFile, etc... - these are the types we need to startup and display 
the logo.
                JITing methods:
                                Not on hello world, but on a more complex 
scenario, I know we JIT 2500 methods on startup on the desktop CLR (this is 
loading the Python version of the chess API shown at MIX - but not actually 
running it).  Obviously that's going to take some time too.  W/o an ngen's 
mscorlib we'll JIT something like 4000 methods.

There's also some little things here and there but my numbers show JITing is 
representing around 70% of our startup time.  Being as fast as CPython might be 
tough but we certainly want to do better than where we are.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of C L
Sent: Tuesday, July 17, 2007 2:10 AM
To: [email protected]
Subject: [IronPython] IronPython Start-up Time

Hello,

playing around a bit with IronPython I noticed that the start-up time is
quite long

Something around ~12s for the initial launch and around ~3,5s for each following
launch executing
----
    import sys
    sys.exit(0)
----
with IronPython-2.0A2\ipy.exe (on a Core Duo 2Ghz 2GB)

I am not complaining, just curious.
Is this simply because loading the CLR/DLR takes so much time?
And what is with the 3.5s for successive start-ups?

For comparison CPython needs ~2s for the initial and
~0.2s for successive start-ups.

Regards,
Claudius

Btw I used the simple C++ program
----
// Compile with
//    cl /Feuxtime.exe /EHsc uxtime.cpp
//
//    uxtime.exe "PATH_TO_IronPython\ipy.exe simplyExit.py"
//
#include <stdio.h>
#include <ctime>
#include <stdlib.h >

int main( int argc, char**argv)
{
    int c_start = clock();
    system( argv[1]);
    int c_end = clock();
    printf("%d\n", ((double)(c_end - c_start)) / CLOCKS_PER_SEC );
}
----
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to