On Fri, Apr 19, 2002 at 09:04:52PM -0500, Dave Trollope wrote:
> Hi Dominik, all,
>
> A few weeks back you had the following advice for me and I finally got to
> taking a look at some things around ReleiveRectangle.
>
> I found that RelieveRectangle and RelieveRectangle2 both call
> do_relieve_rectangle. In looking at do_relieve_rectangle I found that
> XDrawSegments is called 4 times for two conditions, ShadowGC and RelieveGC. I
> have merged the array two reduce the X calls XDrawSegment from 4 to 2 by
> sending the data for two requests in one call.
>
> However, before we commit this patch, I'd like it to be tested on some other
> systems rather than my own since my knowledge is limited. Can you take a look
> at this patch, and apply it on your system and note any irregularities?
>
> Can some others take a look and apply this too? If no-one reports any bugs
> within a week I propose we add it in to the repositary.
You are too cautious. The patch is good and I'll apply it.
However, it does not help as much as you probably believe. Since
there is no call to XFlush() between the several XDrawSegments
calls, all requests are queued on the client and sent some time
later, when the request buffer is flushed at some other place.
Therefore, there will be only one batch of communication between
the client and the X server, regardless of the number of calls to
XDrawSegments(). What you save is: one half of the function
calls and a bit of bandwidth (four requests need more bytes to be
transmitted than two).
> > Fvwm's speed depends to 90% or more on how the communication with
> > the X server is done. All other effects of calling functions and
> > such only add very little to the CPU load. Once I profiled fvwm
> > for ten minutes using gprof, and as far as I remember it did not
> > even consume one second of CPU time. The things that slow it down
> > are file I/O and X server communication.
> >
> >...
> >
> > Yes, but what is the cost of the malloc? RelieveRectangle is
> > perhaps called 20 times when a window changes focus. I'd guess on
> > average you do not do this more than 5 times per minute, giving a
> > total of 6000 calls per hour. I'd estimate that can easily be
> > done by any but the slowest machines in less than the tenth of a
> > second. It is likely that more time could be saved by preventing
> > unnecessary calls to RelieveRectangle() in a single place in the
> > code since it requires communication over the network.
Bye
Dominik ^_^ ^_^
--
Dominik Vogt, email: d.vogt_at_lifebits.de
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Apr 24 2002 - 11:52:07 BST