Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: GC: how many is too many? Message-ID: <9012030453.AA18589@Larry.McRCIM.McGill.EDU> Date: 3 Dec 90 04:53:08 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 33 > What is the maximum number of GC's that can be cached on X displays > on the Sun workstations and the DECstations? It depends on the server. The MIT sample server does not cache the things in hardware (all drawing is done by the main CPU scribbling on the framebuffer), so the only limit is memory: each GC you create corresponds to a structure allocated in dynamic memory by the server. If the server *does* take advantage of specialized hardware, all bets are off - it depends entirely on what the hardware can do and how the server uses it, though it is unlikely that the overhead per GC will be *less* than for the sample server. > Is there an upper limit on the number of GC's that an X application > should reasonably create? More than one per drawing operation performed is probably excessive :-) I wouldn't worry about it. If the application creates more than about a dozen I'd start wondering what's going on that it needs so many; if you think you want more than ten or so you are probably going about something the wrong way. (I can't give any definite number because there is no sharp line between "OK" and "too many". This estimate of about ten or fifteen as a point at which you should start wondering if you're doing things wrong is just a feeling, not a Rule.) This number I'm referring to is the number of GCs you actually create, not the number of conceptually different GCs. (They're not the same thing because many conceptually different GCs may be implemented identically, or perhaps may be implemented as one GC which keeps getting changed.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu