From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66288: 29.1; Performance regression using pipe for subprocess Date: Tue, 03 Oct 2023 10:32:36 +0300 Message-ID: <83cyxw6u0b.fsf@gnu.org> References: <83ttra91nu.fsf@gnu.org> <63df0312-f2e0-49cd-8536-f886d841e88e@chris-hanson.org> <83edid8vmx.fsf@gnu.org> <83bkdh8u2k.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66288@debbugs.gnu.org To: Chris Hanson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 03 09:34:06 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qnZuv-0007yk-KC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Oct 2023 09:34:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnZub-0006Kr-PW; Tue, 03 Oct 2023 03:33:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnZub-0006Kd-2L for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2023 03:33:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnZua-0005ix-QW for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2023 03:33:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnZur-0000LQ-Qp for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2023 03:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2023 07:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66288 X-GNU-PR-Package: emacs Original-Received: via spool by 66288-submit@debbugs.gnu.org id=B66288.16963183831237 (code B ref 66288); Tue, 03 Oct 2023 07:34:01 +0000 Original-Received: (at 66288) by debbugs.gnu.org; 3 Oct 2023 07:33:03 +0000 Original-Received: from localhost ([127.0.0.1]:38598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnZtv-0000Js-2Z for submit@debbugs.gnu.org; Tue, 03 Oct 2023 03:33:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnZts-0000JO-5E for 66288@debbugs.gnu.org; Tue, 03 Oct 2023 03:33:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnZtU-0005Wx-Iz; Tue, 03 Oct 2023 03:32:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8tIEXpgffA5vh/IaGhKnb6i85PabY00Q2HmMNZkb5no=; b=CL0p9am4R5Dp QqAGdmdnOcdXjaiCm0oPggPwTsfQTBmmn12GWznAuqHx2i4jajUYtUaSumkA924hRZeKBknxJ1DR+ KQy8w3E9LgB1+XiO44aLQ6o7oxQOlh4wXlrtRdPyGPVgknAZ7XLxKsba1z/qBrCJhAeSqfmULYGwK 9iSMesb9YncL7OGDBZZyRl2W+7+4GQ1XTdWsvBWpiZFjkxhuHyy1B5Z/CPUxASLvhwPKTTPiz8bN1 CxRx+vcyRQVb+7ObEPGy/c1TInOIiI9e23YpED4kInMm4vnoVGfOT7eyACXkCxKY8tz0UXNv3F5bh fuE0FsM0FkT4hn2bP25zCQ==; In-Reply-To: (message from Chris Hanson on Mon, 2 Oct 2023 14:22:06 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271695 Archived-At: > Date: Mon, 2 Oct 2023 14:22:06 -0400 > Cc: 66288@debbugs.gnu.org > From: Chris Hanson > > > Finally, if you describe in plain English how xscheme.el reads > > subprocess output at the stage where you see the slowdown, it might > > give further ideas. I'm not familiar with xscheme.el, and figuring > > out which code gets executed when one runs "run-scheme" is not > > trivial, so a detailed enough description might help. Specifically, > > how does xscheme.el decide how much of the subprocess's output to read > > and display? > > The process filter has one complexity: it looks for encoded commands > from the subprocess, which are of the form "ESC " or "ESC > ESC", depending on the . There is a small state machine > to do that, which searches the output string for ESC using > `string-search'. In this case there are no commands embedded, so that > should not be relevant. > > The ordinary text is inserted into the process buffer using standard > filter-output code, except it looks for BEL and translates that to > (beep) if found. In this case there are no occurrences of BEL in the > output, so that's not relevant. So, basically the output string is > passed to `insert', making sure that process mark and point are updated > appropriately. Thanks. It would be good to see the Lisp profiler results for your recipes, in both versions of Emacs, to understand whether any of these Lisp parts have anything to do with the issue. (You say that these aspects of the processing are not relevant, but maybe they have some overhead even when the special characters and commands do not appear in the output?)