[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Refreshing windows as often as possible, but not too often
- From: Ben Laurie <ben algroup co uk>
- To: gtk-app-devel-list redhat com
- Subject: Re: Refreshing windows as often as possible, but not too often
- Date: Fri, 15 Oct 1999 22:44:07 +0100
rsmith@xs4all.nl wrote:
>
> On 14 Oct, Ben Laurie wrote:
> [snip]
> >> Maybe you can add some code to the idle fuction so that it only copies
> >> to the pixmap and refreshes the window if the image in the frame has
> >> changed? That way you refresh as often as is sensible (I mean, why draw
> >> the same image multiple times?) without bogging down the machine.
> >
> > Actually, I've tried waiting for a fresh frame each time. Same deal.
> > Guess I can produce frames faster than X can eat them :-)
>
> Time to start saving for that quadruple Athlon 1000 MHz system then. ;-)
>
> > But, as you say, the problem is that the idle function is called when
> > the _client_ is idle. What I need is a function that gets called when
> > the _server_ is idle!
>
> In your case I'd say there a few options:
> - renice the X server (wild guess)
> - buy a faster computer :-)
> - show the frame at a lower resolution, thus betting a better frame
> rate. Looking at my own machine (a Pentium 150), I think the maximum
> resolution I can play MPG's fluently is about 240x160 or thereabouts.
> - maybe there is an X extension like XIE for showing captured video
> images? Maybe one of the commercial X servers has better support for
> this, I don't know.
> - use raw X instead of GTK+. Saves some cycles, but adds a lot of
> coding.
> - profile the program and see if you can skim some fat off it. As a
> last resort you can try to rewrite performance critical stuff in
> asssembly.
>
> Maybe you should split your app in two parts, a GTK+ user interface and
> a program without a window to grab pictures and copy them to a pixmap
> shared with the user interface program. This second program could run in
> a tight loop, without GTK+ or X overhead
Arg! All of this misses the simple point: no user process should be able
to kill the X server. And worse: it should be possible to not kill the X
server, even if it is possible, if you want to be friendly.
Perhaps I have to post this as a DoS to get anyone to take it seriously
:-)
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]