From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David.Kastrup@t-online.de (David Kastrup) Newsgroups: gmane.emacs.devel Subject: Re: Fix for slow process output processing (please test). Date: 16 Dec 2003 03:14:33 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071541106 11417 80.91.224.253 (16 Dec 2003 02:18:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2003 02:18:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Dec 16 03:18:24 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AW4n2-0004co-00 for ; Tue, 16 Dec 2003 03:18:24 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AW4n1-0002dx-00 for ; Tue, 16 Dec 2003 03:18:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AW5iJ-0001Oe-6p for emacs-devel@quimby.gnus.org; Mon, 15 Dec 2003 22:17:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AW5hv-00017p-78 for emacs-devel@gnu.org; Mon, 15 Dec 2003 22:17:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AW5hF-00007K-23 for emacs-devel@gnu.org; Mon, 15 Dec 2003 22:17:01 -0500 Original-Received: from [194.25.134.83] (helo=mailout07.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AW5hD-0008Vg-VP for emacs-devel@gnu.org; Mon, 15 Dec 2003 22:16:28 -0500 Original-Received: from fwd11.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1AW4jZ-0003mw-02; Tue, 16 Dec 2003 03:14:49 +0100 Original-Received: from localhost.localdomain (rSArc0ZEYeBIpbz+obqAMfE1mjehufjv006b9OwzBrj5QAlufyH54L@[217.80.160.65]) by fwd11.sul.t-online.com with esmtp id 1AW4jO-12sAMq0; Tue, 16 Dec 2003 03:14:38 +0100 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id hBG2EaTQ001928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Dec 2003 03:14:36 +0100 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id hBG2EXtG001924; Tue, 16 Dec 2003 03:14:33 +0100 Original-To: no-spam@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Seen: false X-ID: rSArc0ZEYeBIpbz+obqAMfE1mjehufjv006b9OwzBrj5QAlufyH54L 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:18706 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18706 no-spam@cua.dk (Kim F. Storm) writes: > David Kastrup and others have reported very slow processing of > process output, particularly with the Linux kernel's scheduler > giving emacs too much attention while starving the processing > producing the output. > > Below is a patch which introduces a small delay on reading output > from such processes, without using global delays in processing other > events (this is done by temporarily removing the process' file > descriptor from the call to select and use a short timeout on the > select instead. > > I have not yet tested this extensively, but would like some feedback > on whether it actually does have the intended positive effect on the > processing of process output. Could people who have experienced > these problems pls. try the patch and give me feedback. One thing that I mentioned might be a good idea is to cancel any prospective delay on the next read when something is sent to the process. In that manner there will be no delay when some protocol is talked instead of just output collected. > The patch is against CVS emacs at the time of "server shutdown". I have experimented around with several (quite more naive) approaches myself, never reaching a point that would have been worth discussing, let alone committing, so I don't have a reasonably clean process.c. Could you send me a complete copy of yours in private mail? Thanks. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum