From owner-freebsd-hackers Thu Oct 3 10:43:07 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA10944 for hackers-outgoing; Thu, 3 Oct 1996 10:43:07 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA10939 for ; Thu, 3 Oct 1996 10:43:05 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA06338; Thu, 3 Oct 1996 10:41:27 -0700 From: Terry Lambert Message-Id: <199610031741.KAA06338@phaeton.artisoft.com> Subject: Re: XDrawString To: rb@gid.co.uk (Bob Bishop) Date: Thu, 3 Oct 1996 10:41:27 -0700 (MST) Cc: terry@lambert.org, jmacd@cs.berkeley.edu, freebsd-hackers@FreeBSD.org In-Reply-To: from "Bob Bishop" at Oct 3, 96 08:38:49 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > >> >My results showed that XDrawString on a 2048 character string, > >> >where only 50 or so are on-screen takes much longer than the same > >> >call with only the visible length supplied. > >>[etc] > > > >I personally expect the Xlib to imply a cliprect on the data it sends > >to the X server.[etc] > > If *someone* isn't clipping, then things is surely broke. Trouble is, when > there is clipping the algorithm seems to go exponential if one end of the > draw is in the window and the other is far away. I guess it depends on whether you think that the most likely event will be: 1) Tiny bit of what is drawn is off screen 2) Most of what is drawn is off screen Case (1) would make you want to take the hit of drawing a small amount of non-visible objects that get clipped by the server as a trade for putting a clip region comparison in the inner loop. Case (2) would make you want to take the hit of putting a clip region comparison in the inner loop as a trade for draw a large amount of non-visible objects that get clipped by the server. I would think it would depend on whether you expected the programmer using the system to be careful (case 1) or sloppy (case 2). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.