discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gui responsiveness


From: Stefan Böhringer
Subject: Re: gui responsiveness
Date: Thu, 14 Aug 2003 08:47:42 +0200

> I'm working on an application which has a background thread performing
> some extensive operations.  What I am noticing is that the gui is
> fairly unresponsive; this is presumably because my background thread is
> eating up a lot of cpu time.  I cannot slow down my background thread
> because I really do need to do as many computations as possible, but as
> soon as a user event comes in, I want the gui to respond immediately.
>
> * I've tried setting the thread priority but this doesn't seem to
> affect anything on my system (redhat 9.0).
I don't know about threads, but if you can do your computation in another
process and renice that you shouldn't be able to tell the difference with no
system load with regard to gui responsiveness. You might look at the zillion
sources (zillion.sf.net) for fairly automated ways to instantiate new
objects in different processes.

> * Maybe my background thread can check to see if there are any gui
> events in the queue, if yes then it can pause momentarily until the
> queue is freed up?
>
> * Or maybe there is some way for my background thread to listen on the
> incoming user events and perform the same sort of pause scenario?
These proposals seem very complicated to me.

> One behaviour that I'm seeing is that I will click (mouse up and down)
> a menu item, then move the cursor over another menu item.  The action
> will be called for the later menu item and not for the original one
> where I did the mouse click.
>
> I don't think that the X server itself is overloaded because I'm able
> to switch between windows and use those windows (like emacs) and have
> them be responsive.
>
> Anybody have any ideas?
Did you renice whole your GNUstep app to see what that does to the
responsiveness of other processes?

Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]