From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: [patch] cache color info for remote X sessions [Was: Emacs 21/X11 generating unbelieveable network traffic] Date: Mon, 07 Oct 2002 10:53:52 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200210071453.g97Erqu24465@rum.cs.yale.edu> References: <20021006012932.GA9183@gnu.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034002587 17874 127.0.0.1 (7 Oct 2002 14:56:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2002 14:56:27 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yZJ4-0004e9-00 for ; Mon, 07 Oct 2002 16:56:26 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17ya6B-0008Fk-00 for ; Mon, 07 Oct 2002 17:47:11 +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 17yZHn-0000Tz-00; Mon, 07 Oct 2002 10:55:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17yZH4-000863-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 10:54:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17yZH2-00084m-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 10:54:21 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yZH2-00084i-00 for emacs-devel@gnu.org; Mon, 07 Oct 2002 10:54:20 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g97Erqu24465; Mon, 7 Oct 2002 10:53:52 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Ami Fischman 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:8438 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8438 > - The keys were being xmalloc'ed (unnecessarily) and then leaked. Instead > each of the wrapper functions now has a static buffer (of a #define'able > size) to store the transient keys. Yuck! At least use alloca. Disallowing re-entrance is always a bad idea. By the way, is the cached answer always the same as the one we would have goten without the cache ? IF not, what is the potential impact ? Can/should we invalidate the cache sometimes to avoid/reduce those problems ? Stefan