From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 04 03:29:52 2021 Received: (at submit) by debbugs.gnu.org; 4 Apr 2021 07:29:52 +0000 Received: from localhost ([127.0.0.1]:34791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSxCf-0005ov-7M for submit@debbugs.gnu.org; Sun, 04 Apr 2021 03:29:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:39718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSsse-0007Kb-Aq for submit@debbugs.gnu.org; Sat, 03 Apr 2021 22:52:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSssd-0002PT-Vx for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 22:52:52 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:33559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSssc-0002DP-1s for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 22:52:51 -0400 Received: by mail-wr1-x429.google.com with SMTP id f12so1974899wro.0 for ; Sat, 03 Apr 2021 19:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=I8vpZ8GS2D9tI0l2Od1XNwFk1XugPHQmaW7RYvNvVIo=; b=WUVUoYxdDoRwvbQn98K+Gj07TLNDBpTUeT1MElh7ei0iPwp9JSZad2py7UWwOC8TVM EpMKRO7H6R4eaaENHJotJTgeOmFm+3TFcm2TUNmgZHtXXZRMfBXuhu5d8o3nr9pzW56W cnmsqzuxCB4ueJN5a9G8nGKHmZWDWo5siiFL3ux5EeIRoUFC4kvc9tElfcQVJ+rfD+uD wFesgF/Kd0eARztvpLKspnu0PNqi4iQGQfHyeo4Hdkd2a27H/G4GJnZBLkxM6ocrD3i8 VErfkxdHxBPNSxbdOmQHnOlODyRLQO3+h7TJWxYs6Lqqx2uWEFLZxFZSL+QADw5FLVQW FvQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=I8vpZ8GS2D9tI0l2Od1XNwFk1XugPHQmaW7RYvNvVIo=; b=ug5wBKFW5wn7akLt/KGS6Qa5MG6hUGavNu6+aONfr1JI2ctZ9rUVaHw0YfDCaBeoWJ cRL3lJUjynGVwmwhmdLZNKK3YdMqZsyUPARixpH+EcLUq1XVYNZGLmC5AUt8yxOfzRXh vQ8BitCF/DMoEcMUrjpp4+ejZoS8ZpU/i3h47/bY2JdJ6MPX8Gru5lr+wFJID1pO6KIS W5d+S42yBz9b12Ge/zSw+oUTQvcKe0lGspO9D9Q0nM9APso1QSMTb54020NoM+EqIkot 0lrYs2teZu3hCCodrJ6SqH1h7LO8FZU4iCwMilUQzSwOrXubHeTeSDddPaguaeOQVRDz xFqw== X-Gm-Message-State: AOAM530xfpJXQUDfBwSFIDKcgsDmW2Ybmqtb4u/QYk1T2vc2ovSFViOp T82WSt4tXS9dQudut0zcxhxwTRJpjhbH8mPwHSwhUbtqqd1lSQ== X-Google-Smtp-Source: ABdhPJxG9SnacGBm98egnx2DGAyvx5gFAZ0WmbBptRHIENMhyv6JySrQWB9HUYksP/Gqe5iqeHAKVeBhwD4bAF6UNqI= X-Received: by 2002:a5d:5256:: with SMTP id k22mr22919288wrc.162.1617504766989; Sat, 03 Apr 2021 19:52:46 -0700 (PDT) MIME-Version: 1.0 From: Anton Tayanovskyy Date: Sat, 3 Apr 2021 22:52:36 -0400 Message-ID: Subject: [PATCH] 27.1; Freeze on long lines in compilation-shell-minor-mode To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=anton.tayanovskyy@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 04 Apr 2021 03:29:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) To reproduce the issue of Emacs freezing on long lines, do the following: ``` M-x shell M-x compilation-shell-minor-mode $ python3 -c 'print("x"*1024*8)' ``` Depending on the machine configuration, make your lines longer. 1024*8 is enough to freeze my MacBook Pro 2019 visibly but I need more characters to slow down an XPS-13 running Ubuntu. In the real world the issue comes up when I'm enjoying my compilation-shell-minor-mode buffer but accidentally cat or print some data with very long lines. Then Emacs freezes and I experience one of my very rare moments of unhappiness with the editor. Using `M-x profiler-start, profiler-stop, profiler-report` the culprit is `compilation-parse-errors`. The function loops over many (about 50) patterns of potential error output and scans the buffer for them repeatedly. The patch edits the function to use a limited version of `re-search-forward`. Instead of finding the pattern everywhere, it only looks for the pattern in the first 1024 chars of every line. It seems plausible that real-world compiler warnings would sit close to the beginning of lines. With the patch the experience (in combination with global-so-long-mode) becomes tolerable; while not lightning fast, Emacs is a lot more responsive in this situation and I as a user retain control to fix the problem, such as comint-clear-buffer etc. FWIW see also the PR https://github.com/emacs-mirror/emacs/pull/24/files --- lisp/progmodes/compile.el | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7a02c3a896..45c69f330c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1535,7 +1535,7 @@ to `compilation-error-regexp-alist' if RULES is nil." (error "HYPERLINK should be an integer: %s" (nth 5 item))) (goto-char start) - (while (re-search-forward pat end t) + (while (compilation--re-search-forward-limited pat end 1024) (when (setq props (compilation-error-properties file line end-line col end-col (or type 2) fmt rule)) @@ -1597,6 +1597,28 @@ to `compilation-error-regexp-alist' if RULES is nil." (match-beginning mn) (match-end mn) 'font-lock-face (cadr props))))))))) +(defun compilation--re-search-forward-limited (regexp bound n) + "Like 're-search-forward limited to the first N chars per line. +This avoids Emacs performance degradation on scanning excessively +long lines of text. It is reasonable when scanning for compiler +warnings to expect to find them early on each line. REGEXP and +BOUND are as in 're-search-forward." + (let ((inhibit-field-text-motion t) + (found nil) + (orig-point (point))) + (while (and (null found) + (< (point) bound) + (not (eobp))) + (setq found (re-search-forward regexp + (max (point) + (min bound (+ (point-at-bol) n))) + t)) + (when (null found) + (forward-line 1))) + (when (null found) + (goto-char orig-point)) + found)) + (defvar-local compilation--parsed -1) (defun compilation--ensure-parse (limit) -- 2.28.0 -------------------------------------------------------------------------------- In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 System Description: Ubuntu 20.04.2 LTS Configured using: 'configure --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-emacs-27.1 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER GMP From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 06:52:05 2021 Received: (at 47589) by debbugs.gnu.org; 6 May 2021 10:52:05 +0000 Received: from localhost ([127.0.0.1]:37352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebbx-0002i0-0e for submit@debbugs.gnu.org; Thu, 06 May 2021 06:52:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebbu-0002ha-P9 for 47589@debbugs.gnu.org; Thu, 06 May 2021 06:52:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RWAlYoq2os6ULKxg8o4TPcPBFg+0OYt23OGK9p8sdkc=; b=gELQv5emyOHmgIFYT/r9muiQxY qtVLROYtY+spMLeocGNKMv7jisB+Xl4buWEZ7LzYXI24hY+8WiFbaziaOnvi9m9KXa9W85Rm112OF hlES3NwfzEYyNQFuIF9IcQDzNLRmFP029udYq9NpySLWOJLiMBAHE2khX7TpCboENlkg=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lebbm-0006I8-BE; Thu, 06 May 2021 12:51:56 +0200 From: Lars Ingebrigtsen To: Anton Tayanovskyy Subject: Re: bug#47589: [PATCH] 27.1; Freeze on long lines in compilation-shell-minor-mode References: X-Now-Playing: Nico's _Do Or Die_: "Femme Fatale" Date: Thu, 06 May 2021 12:51:53 +0200 In-Reply-To: (Anton Tayanovskyy's message of "Sat, 3 Apr 2021 22:52:36 -0400") Message-ID: <87fsz0w2wm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Anton Tayanovskyy writes: > The patch edits the function to use a limited version of > `re-search-forward`. Instead of finding the pattern everywhere, it only > looks for the pattern in the first 1024 chars of every line. It s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47589 Cc: 47589@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Anton Tayanovskyy writes: > The patch edits the function to use a limited version of > `re-search-forward`. Instead of finding the pattern everywhere, it only > looks for the pattern in the first 1024 chars of every line. It seems > plausible that real-world compiler warnings would sit close to the > beginning of lines. > > With the patch the experience (in combination with global-so-long-mode) > becomes tolerable; while not lightning fast, Emacs is a lot more > responsive in this situation and I as a user retain control to fix the > problem, such as comint-clear-buffer etc. I think that's an interesting approach to this problem. I seem to recall there being some work in this area, though, and I'm not able to see the slowdowns in the example given here (even if I increase the number hugely). Would it be possible for you to test Emacs 28 and see whether you still see the problem there? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 06:52:08 2021 Received: (at control) by debbugs.gnu.org; 6 May 2021 10:52:08 +0000 Received: from localhost ([127.0.0.1]:37355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebc0-0002iC-7p for submit@debbugs.gnu.org; Thu, 06 May 2021 06:52:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lebbz-0002hj-6n for control@debbugs.gnu.org; Thu, 06 May 2021 06:52:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EpycKgXrhfhfBFK5Hz0UjZNrXvW/3KjCxxq85dm5f+I=; b=TR2XieayjlydIiIPFb9nV62f6w NvgvWHAzdL58OsYWTONFjMSnIF6BdWwMARBqZfbntW8TzJMBLNEMTogPYjLFvp1BHThGkCbBpXHyd Yu2vlFdf5JBr/fkiSuEmEIUAUCVNmL+LUshShyPQe5/E2rLH41/6l6ZPmwaTbJ67wBbc=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lebbr-0006IH-Kc for control@debbugs.gnu.org; Thu, 06 May 2021 12:52:01 +0200 Date: Thu, 06 May 2021 12:51:59 +0200 Message-Id: <87eeekw2wg.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47589 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47589 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47589 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 05 16:19:57 2021 Received: (at 47589) by debbugs.gnu.org; 5 Jun 2021 20:19:57 +0000 Received: from localhost ([127.0.0.1]:50107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpclw-0007XB-PR for submit@debbugs.gnu.org; Sat, 05 Jun 2021 16:19:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpclv-0007Wu-SA for 47589@debbugs.gnu.org; Sat, 05 Jun 2021 16:19:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XDkepen9OrrlGSrC0e7CiVl4z3o2KMGQpjkkq8lesSU=; b=H8UJsNehLC8NXWVAvY5TU1Rpvl YM09P+ddtIzYnSVXjFy+yb8cQP1vTW+y11BgrIAbFr5ARr6bCJjfyLrFTz5BPi8hhcecGO8xPTchP yCGW7lP5nQBPVV340V9Y0kwyu/L26iHNWKLETg45gi95m5hKDeNHiOLHkRfOc4aPw8x0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpcln-0007HL-Tf; Sat, 05 Jun 2021 22:19:50 +0200 From: Lars Ingebrigtsen To: Anton Tayanovskyy Subject: Re: bug#47589: [PATCH] 27.1; Freeze on long lines in compilation-shell-minor-mode References: <87fsz0w2wm.fsf@gnus.org> X-Now-Playing: Anne Clark's _R.V.S.P._: "Our Darkness" Date: Sat, 05 Jun 2021 22:19:47 +0200 In-Reply-To: <87fsz0w2wm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 06 May 2021 12:51:53 +0200") Message-ID: <87eedgvzbw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I think that's an interesting approach to this problem. I seem to > recall there being some work in this area, though, and I'm not able to > see the slowdowns in the example given here (even if I in [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47589 Cc: 47589@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > I think that's an interesting approach to this problem. I seem to > recall there being some work in this area, though, and I'm not able to > see the slowdowns in the example given here (even if I increase the > number hugely). > > Would it be possible for you to test Emacs 28 and see whether you still > see the problem there? More information was requested, but no response was given within a month, so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 05 16:20:02 2021 Received: (at control) by debbugs.gnu.org; 5 Jun 2021 20:20:02 +0000 Received: from localhost ([127.0.0.1]:50111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpcm2-0007Xk-0h for submit@debbugs.gnu.org; Sat, 05 Jun 2021 16:20:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpcm0-0007X4-Hr for control@debbugs.gnu.org; Sat, 05 Jun 2021 16:20:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YrthedFEFO/FDnzr5ODqsb5sX13lKS6LYKwHZV1n0Os=; b=lKFOJCA7Ccqkv3J70Dv66vBBou SLu2VWV3yTyOYzH87zNLooRYrRGUigtbZ5u/SONml0D+RNRaJbHOLay/QB6J+zYutza2AtIlicS41 zxvPwMAene9YMwIOksoNzLMHVp22YXqv5NrZiQiXyRISArTQ4SaSQg0xfgG0EsYCogAM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpclt-0007HS-6d for control@debbugs.gnu.org; Sat, 05 Jun 2021 22:19:55 +0200 Date: Sat, 05 Jun 2021 22:19:52 +0200 Message-Id: <87czt0vzbr.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47589 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 47589 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 47589 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 00:23:13 2021 Received: (at 47589) by debbugs.gnu.org; 12 Jun 2021 04:23:13 +0000 Received: from localhost ([127.0.0.1]:40183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrvAr-00034U-Gb for submit@debbugs.gnu.org; Sat, 12 Jun 2021 00:23:13 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:38420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrty8-0001Hu-TG for 47589@debbugs.gnu.org; Fri, 11 Jun 2021 23:05:58 -0400 Received: by mail-wr1-f51.google.com with SMTP id c9so7917757wrt.5 for <47589@debbugs.gnu.org>; Fri, 11 Jun 2021 20:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=5jJrNqHgDyM5RslqFx042/VCyW7m4A0niotvq+gqqeA=; b=Hj1EmplPZPssij2IaMxwiMrTEOr/VGwgHDi+WheePZXKlTv4LyA9MRtLW9tHTdLTZI xzuJ9Wx9FTc3/ZPOO3pBJwLSPwCtUydzlqD3JqJGzi1fjPLNaUzgMWp6k8bYI5szz4Ys ZdeXQEWHIr+sDNiNojc56iCo6HRzouhsnmkB6NxwiQ5nIKl532T7ssiZItUw1l27bZWc 6PG3QSQ5u+FPHwKQRMsNXKCYdg0dKgaGVtvSLg7fn550v3QWEUmPHtfUUUeAmNWEwO3T 1g1mdCNUiz87RWNSmo6zQ5XZNB73kjePJ5mrqFMwRQ6jOiv2C3VzJ2jYKT6XI5EtF2BU JhnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5jJrNqHgDyM5RslqFx042/VCyW7m4A0niotvq+gqqeA=; b=uDxaoH/iiRf/xSrkw+XbrEPWD6rtpSnZYr7Noz/S1P+LX88ZSChHEz1nuuRhSFqZNe 7PXxSyyCRWWsxiS/8ZdRY8LfZw7JQumjCtlZaNXNtP6n9a5TyR77hn9dv55wE3l/Oce9 vRD+QtrHVip4CFZicHTEg+5jYEUaDKGX4R16+Voga5A/rKuZnM9M/HHh/Cav6u3MGnAe A5keXDtB84c3ZIze/973y+kTuXnnurDCOU6Hiz7MhAYTNhCKFCX8qOdlEB8s5nEM4ZUs 5cg5JPdhayaAGvVsEfi+h3Mi99rOSxfDRmSvwsP0cWrPmuBu/jA5k3as6unAu19hMdEh QcTg== X-Gm-Message-State: AOAM531fduWmQmy0pgGZTLiKT7mXEK0uFZWlhxYWaS4WhjbqWmQ5UgEi wJ5WulPtsZuVSwyiw0TzDajJ3A8eFg7jdOowbLaGQwdOoVM= X-Google-Smtp-Source: ABdhPJywHA62tFrh+HV/LnnT8sZfMi026dIxaYOfAfG2KUFfNaVTrn8KqvwcbJkrWpSOOo/cCTu39XeQHM4vIuHdDwg= X-Received: by 2002:a05:6000:10cc:: with SMTP id b12mr6876118wrx.54.1623467150626; Fri, 11 Jun 2021 20:05:50 -0700 (PDT) MIME-Version: 1.0 From: Anton Tayanovskyy Date: Fri, 11 Jun 2021 23:05:39 -0400 Message-ID: Subject: not reproducing on emacs 28 To: 47589@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000d151ba05c488e6e2" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47589 X-Mailman-Approved-At: Sat, 12 Jun 2021 00:23:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d151ba05c488e6e2 Content-Type: text/plain; charset="UTF-8" Thanks for looking into it. I have tried to reproduce the slowdown on Ubuntu with Emacs 28 and 27.2 and compared against my current patched 27.1 Emacs. The conclusion is that something improved in a recent version of Emacs and the patch is not moving the needle on this. There is still a super-liner cost somewhere. But as a user I only hit this when accidentally displaying a large file, and current behavior is interactive enough that I can kill the process running in the shell. Once I get a chance I would also like to try on Mac OS X where the problem was more pronounced. Thanks, Anton |--------------------+---------------------------------------+----------------| | GNU Emacs 27.2 | time python3 -c 'print("x"*1024*256)' | real 0m20.805s | | GNU Emacs 28.0.50 | time python3 -c 'print("x"*1024*32)' | real 0m0.315s | | GNU Emacs 28.0.50 | time python3 -c 'print("x"*1024*64)' | real 0m1.151s | | GNU Emacs 28.0.50 | time python3 -c 'print("x"*1024*128)' | real 0m6.168s | | GNU Emacs 28.0.50 | time python3 -c 'print("x"*1024*256)' | real 0m22.153s | | GNU Emacs 27.1* | time python3 -c 'print("x"*1024*32)' | real 0m0.237s | | GNU Emacs 27.1* | time python3 -c 'print("x"*1024*64)' | real 0m1.108s | | GNU Emacs 27.1* | time python3 -c 'print("x"*1024*128)' | real 0m5.172s | | GNU Emacs 27.1* | time python3 -c 'print("x"*1024*256)' | real 0m24.369s | | GNU Emacs 28.0.50* | time python3 -c 'print("x"*1024*32)' | real 0m0.234s | | GNU Emacs 28.0.50* | time python3 -c 'print("x"*1024*64)' | real 0m0.978s | | GNU Emacs 28.0.50* | time python3 -c 'print("x"*1024*128)' | real 0m4.716s | | GNU Emacs 28.0.50* | time python3 -c 'print("x"*1024*256)' | real 0m19.047s | --000000000000d151ba05c488e6e2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for looking into it.

I hav= e tried to reproduce the slowdown on Ubuntu with Emacs 28 and 27.2 and comp= ared against my current patched 27.1 Emacs. The conclusion is that somethin= g improved in a recent version of Emacs and the patch is not moving the nee= dle on this.

There is still a super-liner cost somewhere= . But as a user I only hit this when accidentally displaying a large file, = and current behavior is interactive enough that I can kill the process runn= ing in the shell.

Once I get a chance I would also= like to try on Mac OS X where the problem was more pronounced.
<= br>
Thanks,

Anton

|--------------------+------------------------------------= ---+----------------|
| GNU Emacs 27.2 =C2=A0 =C2=A0 | time python3 -c &= #39;print("x"*1024*256)' | real 0m20.805s |
| GNU Emacs 28= .0.50 =C2=A0| time python3 -c 'print("x"*1024*32)' =C2=A0= | real 0m0.315s =C2=A0|
| GNU Emacs 28.0.50 =C2=A0| time python3 -c '= ;print("x"*1024*64)' =C2=A0| real 0m1.151s =C2=A0|
| GNU E= macs 28.0.50 =C2=A0| time python3 -c 'print("x"*1024*128)'= ; | real 0m6.168s =C2=A0|
| GNU Emacs 28.0.50 =C2=A0| time python3 -c &#= 39;print("x"*1024*256)' | real 0m22.153s |
| GNU Emacs 27.= 1* =C2=A0 =C2=A0| time python3 -c 'print("x"*1024*32)' = =C2=A0| real 0m0.237s =C2=A0|
| GNU Emacs 27.1* =C2=A0 =C2=A0| time pyth= on3 -c 'print("x"*1024*64)' =C2=A0| real 0m1.108s =C2=A0|=
| GNU Emacs 27.1* =C2=A0 =C2=A0| time python3 -c 'print("x&quo= t;*1024*128)' | real 0m5.172s =C2=A0|
| GNU Emacs 27.1* =C2=A0 =C2= =A0| time python3 -c 'print("x"*1024*256)' | real 0m24.36= 9s |
| GNU Emacs 28.0.50* | time python3 -c 'print("x"*102= 4*32)' =C2=A0| real 0m0.234s =C2=A0|
| GNU Emacs 28.0.50* | time pyt= hon3 -c 'print("x"*1024*64)' =C2=A0| real 0m0.978s =C2=A0= |
| GNU Emacs 28.0.50* | time python3 -c 'print("x"*1024*1= 28)' | real 0m4.716s =C2=A0|
| GNU Emacs 28.0.50* | time python3 -c = 'print("x"*1024*256)' | real 0m19.047s |

--000000000000d151ba05c488e6e2-- From unknown Thu Aug 21 12:12:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 10 Jul 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator