From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: [patch] cache color info for remote X sessions [Was: Emacs 21/X11 generating unbelieveable network traffic]
Date: Mon, 7 Oct 2002 19:59:08 +0200 [thread overview]
Message-ID: <7A03BB6B-DA1E-11D6-8DDC-00039363E640@swipnet.se> (raw)
In-Reply-To: <m37kgu5h41.fsf@fischman.org>
måndagen den 7 oktober 2002 kl 18.49 skrev Ami Fischman:
> "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
>
> [...]
>
>> As someone whose colormap is full about 95% of the time, I can
>> assure you that tose things happen ;-)
>
> Really? I guess I've been spoiled by my video card (which is a not very
> respectable 4M matrox) and more respectable lack of use of colors :)
You can listen for XColormapEvent and invalidate the cache if the colormap
changes. I think Emacs just uses one colormap.
> The shame of not caching the XFreeColors has caught up with me, so I added
> a refcount and a wrapper for XFreeColors that takes advantage of the
> refcount (so the X server only sees the Free request once per cached color,
> and upon final Free'ing, the cache entry is removed). This ensures there
> are no stale entries in the cache. The performance hit is negligible in
> my
> tests.
>
> The newest versions of xcache.[ch] reflect:
> - Reformatted function calls to K&R style
> - Added a lot of comments to explain what's going on
> - Added refcounting & XFreeColors caching
>
> Note that in order to take advantage of the XFreeColors caching, you need
> to add the xcache.h header to other files. Included is also a patch that
> does that.
Or, for gcc, do
make CC='gcc -include xcache.h'
Jan D.
next prev parent reply other threads:[~2002-10-07 17:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-06 0:21 [patch] cache color info for remote X sessions [Was: Emacs 21/X11 generating unbelieveable network traffic] Ami Fischman
2002-10-06 1:29 ` Miles Bader
2002-10-06 5:31 ` Ami Fischman
2002-10-06 6:53 ` Miles Bader
2002-10-06 17:59 ` Jan D.
2002-10-06 20:22 ` Ami Fischman
2002-10-06 18:14 ` Ami Fischman
2002-10-07 14:53 ` Stefan Monnier
2002-10-07 15:35 ` Ami Fischman
2002-10-07 15:52 ` Stefan Monnier
2002-10-07 16:49 ` Ami Fischman
2002-10-07 17:59 ` Jan D. [this message]
2002-10-07 18:14 ` Jan D.
2002-10-07 20:07 ` Stefan Monnier
2002-10-08 5:16 ` Jan D.
2002-10-08 17:21 ` Richard Stallman
2002-10-07 15:31 ` Richard Stallman
2002-10-07 17:04 ` Ami Fischman
2002-10-08 17:21 ` Richard Stallman
2002-10-06 7:46 ` Jan D.
2002-10-06 17:33 ` Ami Fischman
2002-10-07 15:31 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7A03BB6B-DA1E-11D6-8DDC-00039363E640@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.