Hi,
Thanks for the comments. I discovered this morning that it was due to the firewall that was testing the files that I created and thus slowing down the writing of the files. After I switched it off it all was fine. Thanks again.
meneer

--- On Sun, 8/2/09, Werner F. Bruhin <werner.bruhin@free.fr> wrote:

From: Werner F. Bruhin <werner.bruhin@free.fr>
Subject: Re: [Py2exe-users] file open close very slow
To: py2exe-users@lists.sourceforge.net
Date: Sunday, August 2, 2009, 10:26 AM

Robert,

Robert Robert wrote:
> Hi,
> I use python 2.4.4, py2exe 0.6.9,  windows XP.

> I totally agree with you that I should of come up with a test case..
> First of all by program is very large, lots of code. I also indeed from
> my code copy out the bit where I write to file and create a small
> program with a single loop over writing 200 times to file. Created a .py
> file and an .exe with py2exe. Both were writing fast to file with no
> problem. If it sounded as I said that the py2exe make writing to file
> slow, I apologise for that. Its just that in the "big" program that I
> have experienced that it is slow... I used the profile and it gave me
> like 0.024 seconds for the close command. I did not do a profiling of
> .py and .exe, but I can see it is slow. With a print statement, I can
> just see that the .py is like 10 times faster with open, write and
> close. I removed the open write close, and I see the print statement
> very fast again showing that it is there. I just think it might be a
> combination of factors that causes it to become slow, I can't reproduce
> it by making a small script where I just open write close. So, I am
> actually also clueless. I was just wondering if anyone might have
> experienced something like that and have solved it. Or have any idea on
> what I can sort out more to tackle the problem. Thanks in advance.
> meneer
Why don't you create a small script similar to what Daryl has done which
logs the timing etc to a file for open, write and close.

Then create an exe and run it.

What are you doing when writing?  Are you just appending to the file, or
....?  How much are you writing?

Where are the files when you use the .exe version?  In the app folder,
on a network drive on ...?

Werner


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users