Slow program exit after using wxFileDialog. Help diagnosing?

83 views
Skip to first unread message

grunculus

unread,
Nov 13, 2012, 6:11:17 PM11/13/12
to wxpytho...@googlegroups.com
Hi All,

Again returning to Mike's FileDialog example -
http://www.blog.pythonlibrary.org/2011/02/10/wxpython-showing-2-filetypes-in-wx-filedialog/

I'm using Win7 (32-bit) on a recent laptop:

Python Platform: win32
Python Version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500
32 bit (Intel)]
wxPython version: 2.9.2.4 msw (classic)

If I run the program from a command prompt and select no files and
simply close the program using the upper right X icon, the program
closes instantly and I get the command prompt back instantly.

If I run the program from a command prompt, hit the Open File Dialog
button, hit the Cancel button to close the file dialog, then close the
wx window via the upper-right X, it takes a long time for the command
prompt to return (5s or longer). Similarly if I select ~ 6 files then
close the wx window via the X - it takes about 5 s for the prompt to
return. Under some combinations of selecting files, canceling, etc.,
it has taken much longer for the prompt to return.

It feels like something isn't getting released inside wxPython
properly, but I have no idea what is causing the issue nor how to
debug it. I haven't tried any other wxPython versions.

(Other wxPython scripts I have here that use the Win32 package to call
the native file dialog don't seem to have this issue.)

Any pointers?

Thanks.

Cheers,
Scott.

Robin Dunn

unread,
Nov 16, 2012, 12:50:04 AM11/16/12
to wxpytho...@googlegroups.com
On 11/13/12 3:11 PM, grunculus wrote:
> Hi All,
>
> Again returning to Mike's FileDialog example -
> http://www.blog.pythonlibrary.org/2011/02/10/wxpython-showing-2-filetypes-in-wx-filedialog/
>
> I'm using Win7 (32-bit) on a recent laptop:
>
> Python Platform: win32
> Python Version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500
> 32 bit (Intel)]
> wxPython version: 2.9.2.4 msw (classic)
>

Does it make any difference if you update to the latest 2.9.4 build?



--
Robin Dunn
Software Craftsman
http://wxPython.org

grunculus

unread,
Nov 16, 2012, 11:33:38 AM11/16/12
to wxpytho...@googlegroups.com
Hi Robin,

Thanks for the reply.

On Fri, Nov 16, 2012 at 12:50 AM, Robin Dunn <ro...@alldunn.com> wrote:
> On 11/13/12 3:11 PM, grunculus wrote:
>>
>> Hi All,
>>
>> Again returning to Mike's FileDialog example -
>>
>> http://www.blog.pythonlibrary.org/2011/02/10/wxpython-showing-2-filetypes-in-wx-filedialog/
>>
>> I'm using Win7 (32-bit) on a recent laptop:
>>
>> Python Platform: win32
>> Python Version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500
>> 32 bit (Intel)]
>> wxPython version: 2.9.2.4 msw (classic)
>>
>
> Does it make any difference if you update to the latest 2.9.4 build?

I installed the 2.9.4.0 wxPython build from the .exe installer. It
didn't make any difference.

I then installed the 2.8.12.1 wxPython build (replacing 2.9.4.0) from
the .exe installer. That didn't make any difference, either.

Then I re-tried a Python program I have that uses win32ui rather than
wxPython. It also has a long delay in closing the command prompt
window after calling a file dialog.

:-/

So it seems to be a Python thing on Win32 (at least on this machine)
rather than a wxPython thing.

Sorry about the noise.

If I figure out a way to reproducibly change the behavior, I'll follow-up.

Cheers,
Scott.

grunculus

unread,
Dec 15, 2012, 9:56:46 PM12/15/12
to wxpytho...@googlegroups.com
Hi all,

Following up on this "slow program exit" issues...
Today I came across a discussion on TechReport.com of "CPU Parking" on
hyperthreaded Intel CPUs running Win7 (or Win8). The slowness seems
to be less obvious if I disable the CPU Parking feature.

I'm not certain if that's the cause for the behavior I'm seeing on
Win7, but it may be related.

A utility that lets one examine and adjust the Parking behavior is here:

http://www.coderbag.com/Programming-C/Disable-CPU-Core-Parking-Utility

HTH others out there.

Cheers,
Scott.
Reply all
Reply to author
Forward
0 new messages