From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ami Fischman Newsgroups: gmane.emacs.devel Subject: Re: [patch] cache color info for remote X sessions [Was: Emacs 21/X11 generating unbelieveable network traffic] Date: Sun, 06 Oct 2002 13:22:05 -0700 Sender: emacs-devel-admin@gnu.org Message-ID: References: <59BD935A-D955-11D6-BC61-00039363E640@swipnet.se> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033935891 26197 127.0.0.1 (6 Oct 2002 20:24:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 6 Oct 2002 20:24:51 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yHxJ-0006oN-00 for ; Sun, 06 Oct 2002 22:24:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17yIk3-0006uH-00 for ; Sun, 06 Oct 2002 23:15:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yHwy-0003tE-00; Sun, 06 Oct 2002 16:24:28 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17yHwF-0002EQ-00 for emacs-devel@gnu.org; Sun, 06 Oct 2002 16:23:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17yHuk-0001Mq-00 for emacs-devel@gnu.org; Sun, 06 Oct 2002 16:22:11 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yHuj-0001KH-00 for emacs-devel@gnu.org; Sun, 06 Oct 2002 16:22:09 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 17yHuD-0006hC-00 for ; Sun, 06 Oct 2002 22:21:37 +0200 Original-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 17yHuC-0006gv-00 for ; Sun, 06 Oct 2002 22:21:36 +0200 Original-Path: not-for-mail Original-Lines: 17 Original-NNTP-Posting-Host: 12-228-169-213.client.attbi.com Original-X-Trace: main.gmane.org 1033935696 25417 12.228.169.213 (6 Oct 2002 20:21:36 GMT) Original-X-Complaints-To: usenet@main.gmane.org Original-NNTP-Posting-Date: Sun, 6 Oct 2002 20:21:36 +0000 (UTC) Mail-Copies-To: nobody User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:ZKJYonbigrnQKJwzhVmSVakOUNQ= Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8433 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8433 "Jan D." writes: > Talking about pango, they have a font cache for X11 fonts in their X11 > specific code. May be worthwhile to check out. Checked it out. The way pango does it is by only caching the pointer to the returned XFontStruct, and maintaining a reference count for each structure (in order to handle the freeing of these structures later). That could work here as well, if we wrap the XFree.*Font.* calls as well. However, my cursory tracing/sniffing seems to indicate that not that many packets get wasted on redundant calls to the font functions, so I'm not sure this is worth doing. -- Ami Fischman usenet@fischman.org