wxPython, threads, and search engine

Stephen Hansen apt.shansen at gmail.com
Wed Jul 18 01:02:31 EDT 2007


I'm assuming you're accessing this Queue in an idle loop maybe? How many
items do you get out of it before you pass and wait for a re-invocation?
Either way, you can try calling 'wx.Yield()' after each add to the GUI or
every few or such, so the GUI can process events.

On 7/17/07, Benjamin <musiccomposition at gmail.com> wrote:
>
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This works fine or small searches, but when the
> results number in the hundreds, the GUI is frozen for the duration of
> the search. I suspect that so many search results are coming in that
> the GUI thread is too busy updating lists to respond to events. I've
> tried buffer the results so there's 20 results before they're sent to
> the GUI thread and buffer them so the results are sent every .1
> seconds. Nothing helps. Any advice would be great.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070717/fb01c294/attachment.html>


More information about the Python-list mailing list