FVWM: Re: Memory Allocations/XDrawSegment

From: Dave Trollope <dave.trollope_at_worldnet.att.net>
Date: Fri, 19 Apr 2002 21:02:58 -0500

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.

What do you think?

Thanks
Dave



> 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.

> > libs/Graphics.c - do_relieve_rectangle
> >
> >
>
> 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.

--
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 Fri Apr 19 2002 - 21:03:52 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST