Re: Threaded GUI slowing method execution?

2009-10-03 Thread Aaron Hoover
On Oct 2, 2009, at 1:18 PM, sturlamolden wrote: On 2 Okt, 21:30, Dave Angel wrote: There could very well be multiprocess support in wxPython. I'd check there first, before re-inventing the wheel. I don't think there is. But one can easily make a thread in the subprocess that polls a pipe

Re: Threaded GUI slowing method execution?

2009-10-03 Thread sturlamolden
On 2 Okt, 21:30, Dave Angel wrote: > There could very well be multiprocess support in wxPython.  I'd check > there first, before re-inventing the wheel. I don't think there is. But one can easily make a thread in the subprocess that polls a pipe and calls wx.PostEvent or wx.CallLater when someth

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 22:29, Aaron Hoover wrote: > My external hardware is actually sending 2000 packets per second right   > now (but that can also be changed). Each packet currently contains 6   > bytes of data and 6 bytes of overhead. So, 12 bytes per packet * 2000   > packets per second is 24k bytes per

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Aaron Hoover
On Oct 2, 2009, at 12:30 PM, Dave Angel wrote: (you responded off-list, which isn't the way these mailing lists work. So I'm pasting your message back to the list, with my response at the end) Sorry about that - a slip of the "reply" button. Actually, I was thinking of the subprocess

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Dave Angel
(you responded off-list, which isn't the way these mailing lists work. So I'm pasting your message back to the list, with my response at the end) Aaron Hoover wrote: But as soon as you have two threads doing "busy work," instead of them getting 50% each, the threading overhead goes way up,

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 20:19, Ole Streicher wrote: > I *do* worry about speed. And I use Python. Why not? There are powerful > libraries available. I do as well. But "powerful libraries" should release the GIL. Let me rephrase that: I am not worried about speed in the part of my code that uses Python. > Us

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 02:51, Aaron Hoover wrote: > All the thread is doing most of the time is sitting around checking   > the serial port for waiting data, reading it, and appending it to a   > list when it finds it. Do your threads ever block waiting for I/O? If they do, is the GIL released while they are

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Ole Streicher
sturlamolden writes: > On 2 Okt, 13:29, Dave Angel wrote: > If you are worried about speed, chances are you are not using Python > anyway. I *do* worry about speed. And I use Python. Why not? There are powerful libraries available. > If you still have "need for speed" on a multicore, you can us

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 13:29, Dave Angel wrote: > Many people have concluded that (in Python) much of what threads are > used for should be done with processes. Remember that threads were invented long before multi-core CPUs were common. Java had threads before the VM could support more than one CPU. The ear

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Dave Angel
Aaron Hoover wrote: I have a wx GUI application that connects to a serial port in a separate thread, reads from the port, and then is supposed to put the data it finds into a queue to be used by the main GUI thread. Generally speaking, it's working as expected. However, one method (that's pa

Threaded GUI slowing method execution?

2009-10-01 Thread Aaron Hoover
I have a wx GUI application that connects to a serial port in a separate thread, reads from the port, and then is supposed to put the data it finds into a queue to be used by the main GUI thread. Generally speaking, it's working as expected. However, one method (that's part of a library I'v