From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Simple optimization for read_avail_input() Date: 20 Feb 2004 01:31:57 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <401A7EFE.8030509@mail.ru> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077233623 3245 80.91.224.253 (19 Feb 2004 23:33:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2004 23:33:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Feb 20 00:33:35 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Atxfj-0006jv-00 for ; Fri, 20 Feb 2004 00:33:35 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Atxfj-0004XI-00 for ; Fri, 20 Feb 2004 00:33:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Atxfb-0001is-VP for emacs-devel@quimby.gnus.org; Thu, 19 Feb 2004 18:33:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AtxfG-0001gd-Of for emacs-devel@gnu.org; Thu, 19 Feb 2004 18:33:06 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Atxej-0001Kf-O9 for emacs-devel@gnu.org; Thu, 19 Feb 2004 18:33:05 -0500 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AtxeN-000112-0U for emacs-devel@gnu.org; Thu, 19 Feb 2004 18:32:11 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id DB3485EE169; Fri, 20 Feb 2004 00:32:04 +0100 (CET) Original-To: Dmitry Antipov In-Reply-To: Original-Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20075 storm@cua.dk (Kim F. Storm) writes: > I don't know if the intended effect on read_avail_input is still > present with my changes, so I would ask you to redo your measurements > to see if my changes are ok. Can you do that? Dmitry kindly measured the effect of my changes, and they were not quite satisfactory, so I have now committed a simpler and more efficient version of read_avail_input, which uses a much smaller input_event buffer (8 instead of 4096 elements) when read_socket_hook is used, and just a single input_event otherwise. My own subjective feeling is that emacs is now more responsive, especially when resizing the frame or dragging a mode line with the mouse. -- Kim F. Storm http://www.cua.dk