Great!
So let's solve this! I've created a simple python script (main.py) that
just import a lot of modules for testing purposes. I've tested it using
cx_freeze 3.0.3 and 4.0. Here are the timings (using time.clock):
source (run 1): 4.80097952393
source (run 2): 4.94203544026
source (run 3): 4.82461576821
cx-freeze-3.0.3 (run 1): 2.06685507516
cx-freeze-3.0.3 (run 2): 2.13191997866
cx-freeze-3.0.3 (run 3): 2.02879521001
cx-freeze-4.0 (run 1): 14.8102686934
cx-freeze-4.0 (run 2): 15.0513819494
cx-freeze-4.0 (run 3): 14.9359805506
The source code that generated this information is available at:
http://www.esss.com.br/~ama/cx_freeze_tests.zip
Note that the "main.py" imports modules from our libraries. You must
replace those imports by other modules available in your machine. But it
must be a lot of imports. In my initial tests I've tried to import all the
python modules but the problem did not happened.
Also note that we use "Visual Studio 8.0sp1" in our toolchain.
I hope the sample code answers most of your questions and helps you to
reproduce the problem in your environment.
Best regards
Alexandre M. Andrade
Configuration Manager
www.esss.com.br
On Thu, Sep 11, 2008 at 14:13, Anthony Tuininga
<[EMAIL PROTECTED]>wrote:
> Hi,
>
> I have no idea what could be causing this but I am certainly
> interested in finding out! Could you add some timing statements into
> your code so we can see what is taking the time? Specifically, before
> any import statements take place in your main code place a print
> statement or logging statement of some sort with the time. In
> addition, add them in the initscript itself so we can see whether the
> slowdown occurs in the C code or in the Python code. Are you using the
> library.zip capability? Or still appending the zip file to the
> executable? Hopefully with some of these answers we might be able to
> figure this out. Thanks.
>
> Anthony
>
> On Thu, Sep 11, 2008 at 9:39 AM, Alexandre Andrade <[EMAIL PROTECTED]>
> wrote:
> > Dear cx-freeze users,
> > For a long time we've been using py2exe to generate our application
> > executables for Windows. This generated very slow executables. More
> > specifically, the import of modules in the executable is very slow, not
> the
> > overall performance.
> > Yesterday we ported cx_freeze 3.0.3 to our toolchain with very pleasant
> > results: the application got as fast as running the source code using
> > python. Eg. The application startup took 1min and now takes less than
> 10seg.
> > After some study we found out that many of our porting problems in
> version
> > 3.0.3 were already solved in version 4.0. So we resolved to try it out.
> > The problem is that version 4.0 generates a slower executable, much
> like
> > py2exe does. We really appreciate all the new features of version 4.0,
> > including the total reorganization of the code, but we are very
> frustrated
> > with this speed problem. So I ask:
> > What is the different between version 3.0.3 and 4.0 regarding the
> import
> > of the modules?
> > What has been added in version 4.0 that could make the import so slow?
> >
> > Alexandre M. Andrade
> > Configuration Manager
> > www.esss.com.br
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > cx-freeze-users mailing list
> > cx-freeze-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
> >
> >
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> cx-freeze-users mailing list
> cx-freeze-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users