From unknown Fri Aug 15 04:03:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52761: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up Resent-From: Simon Pugnet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Dec 2021 19:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 52761@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: Simon Pugnet Received: via spool by submit@debbugs.gnu.org id=B.164028909019119 (code B ref -1); Thu, 23 Dec 2021 19:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Dec 2021 19:51:30 +0000 Received: from localhost ([127.0.0.1]:35025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0U7e-0004yJ-Cy for submit@debbugs.gnu.org; Thu, 23 Dec 2021 14:51:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:46774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0U7c-0004yB-Es for submit@debbugs.gnu.org; Thu, 23 Dec 2021 14:51:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0U7c-00024q-5m for bug-gnu-emacs@gnu.org; Thu, 23 Dec 2021 14:51:28 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:60586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0U7Y-0008Uu-2A for bug-gnu-emacs@gnu.org; Thu, 23 Dec 2021 14:51:27 -0500 Date: Thu, 23 Dec 2021 19:51:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net; s=protonmail2; t=1640289073; bh=hpwCuzCCxdEA+3BObnNM47xLk4NuGdpzwkuNLJN1d3Q=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=fUQTdbxD7gUuTnwd/5BkZn3zk5OFb/saFq4tv4Eyh9ZtlVwGtGYFihnXFNxE53UyH 8OiCR6gtTzAOIr96/DiEW6igFqkQ+mOBnH4GdOAzVCv2jRpbJLAlY29WIB0HfPrcYg uX8NJBU6L5tmQdbntRjWZxJNPWcL6xRo0+WuuKL7JRIEyUJ9YyS9PLH0O0FzTrT/E5 jl1u0NhCfN5QVVJT/J982O95t9zrdlv0h1KiYz5v83vXsdnnlvGym3kfs7TFc9CO0N 6ZZ9mUxGLDHTnPmqsvbaK16pZIdzN9OsEkrHQ4qacCuOBkdZW/yEEr8K51wwtOIW8j wznSSkSBMAYEA== From: Simon Pugnet Message-ID: <87mtkrm76b.fsf@polaris64.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.43.23; envelope-from=simon@polaris64.net; helo=mail-4323.proton.ch 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-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 (--) This is a multi-part message in MIME format. --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've noticed a strange performance issue with Emacs when built --with-pgtk, but only when global-flycheck-mode is called during Emacs start-up. To reproduce, download and extract the following packages: - - Flycheck: https://melpa.org/#/flycheck - Dash.el (dependency): https://elpa.gnu.org/packages/dash.html Assuming these are at ~/flycheck and ~/dash, perform the following steps: - 1. Create ~/init.el as follows: - #+begin_src emacs-lisp (add-to-list 'load-path (expand-file-name "~/flycheck")) (add-to-list 'load-path (expand-file-name "~/dash")) (require 'flycheck) (global-flycheck-mode) #+end_src 2. Run Emacs, loading this init.el file: "emacs -Q -l ~/init.el" Now, when I use C-n/C-p to move around any buffer, there is a very short but noticeable delay between key-presses and the point actually moving. It's quite easy to notice when compared to the same Emacs run as just "emacs -Q". This only happens when Emacs is built --with-pgtk (and other features as below). If I remove --with-pgtk, this delay disappears. Also, if I do not call global-flycheck-mode during initialisation and instead call it manually at some later stage, the delay also does not appear. It only seems to happen when the global-flycheck-mode call is done during initialisation. Please let me know if there is any more information I can provide. All the best and thanks in advance for your help, Simon In GNU Emacs 29.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2021-12-23 built on tikal Repository revision: 2fa7feca336dd16c57ffef072e0f0da6fffe4c5f Repository branch: master Windowing system distributor 'System Description: Arch Linux Configured using: 'configure --with-native-compilation --with-modules --with-json --with-xinput2 --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB Important settings: value of $LC_CTYPE: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /usr/local/share/emacs/29.0.50/lisp/emacs-lisp/eieio-compat hides /usr/local/share/emacs/29.0.50/lisp/obsolete/eieio-compat Features: (shadow sort mail-extr emacsbug message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 56008 9769) (symbols 48 5662 1) (strings 32 16131 1632) (string-bytes 1 536291) (vectors 16 11510) (vector-slots 8 261217 13969) (floats 8 26 26) (intervals 56 224 0) (buffers 992 11)) --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA Content-Type: application/pgp-signature; name=attachment.sig Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=attachment.sig LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaVFKSUJBRUJDQUF5RmlFRU8vZUYzaFlz QU1qN1RhYjl1aE5acUN3TFB2a0ZBbUhFMHl3VUhITnBiVzl1UUhCdg0KYkdGeWFYTTJOQzV1WlhR QUNna1F1aE5acUN3TFB2bEh2QkFBbWx2eUdsQXZNVTdNb09MSlU2N0lPcE9PbWhUag0KZ1dOVzhk NVdLSnYxejZNekpJeDdSejdvSktXUHNDdzZRd1hoTnZwd2tkRmJ4NkllVmhOMzdCZElsSUtmbmQy Nw0KZkUzb3dGczFlR3lpZ1hmeEMxckNvUEg1S0NmRDFJcERidWNUUFZsOTNUOWl2V3FZMmoyYklT YmJ0dkQ3QlNMbw0Kc0toYTRRMGl2Vk83aHVQMTZOcEpNcjBFVDdDTXcydFgvblpSV1Qrc1lzbzJX MkRQb2VYMnlFZGNwTmJzTEdaWg0KMldJU2JpK0RSQ0JVTlBkQVVCZC83MjNvMHBmQkwzMjhoN3d3 ZmE4U1J6QjVlVC9iaU5yWVc3ejdWY3ZCQUo0MQ0KRGhoR3IrVVNxbnlzTW1qRDhxRW1DZlRZWGpB U0ZwNjIyYXl3dmJIaDRwZSt0aUQ1U0ZHV2ZIekVRVlVnYzBySA0KbmlrK0x2VEpNdG5sNVNkdDE5 azcvUWx0amtoeGljemhLOWRDQWJ2ZjJFN3BuWXRKckQyVTVhZFU5QW9GZXNzYw0KSExGblJ0R1hQ QUhMUjhsMlJiMW00R01WM3ROZ1UyMzhiWU10UEVtTC9mMkxaZUJRTHBESzVpU2hRMzNCLytHOA0K bFdnQkduU2s4Nlo5Rnd1OFAxY0hsREV4aERNTk9oTXpzME04dHNGZDN0S0FqangvOUlCZWlZMGVu d2xwclBMMg0KOVA4OU93eXhBTmNzZTNmVEFjRDdNQ2grRTB3a0UzSzZLTncyYWFnQWJVNHpOcDhI MVVQWVRraDdPanNsNUlCZA0KVlhsdm5CUHYwUit5UllTSVczWUtEQXRzMzZ3NU1DUXBjUlhxN1hX cFk5SlRMOERqemhEU0R2M2N2MEJpcS94QQ0KWHUrYTkzVFBGcFFabVJ3PQ0KPUN2ZUINCi0tLS0t RU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ== --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA-- From unknown Fri Aug 15 04:03:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52761: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up Resent-From: Yuuki Harano Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2022 14:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: simon@polaris64.net Cc: 52761@debbugs.gnu.org Received: via spool by 52761-submit@debbugs.gnu.org id=B52761.164148099214105 (code B ref 52761); Thu, 06 Jan 2022 14:57:02 +0000 Received: (at 52761) by debbugs.gnu.org; 6 Jan 2022 14:56:32 +0000 Received: from localhost ([127.0.0.1]:41929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5UBq-0003fM-Ka for submit@debbugs.gnu.org; Thu, 06 Jan 2022 09:56:32 -0500 Received: from shiro.masm11.me ([150.95.182.25]:50466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5UBk-0003f7-Q3 for 52761@debbugs.gnu.org; Thu, 06 Jan 2022 09:56:29 -0500 Received: from luna.pink.masm11.me (i153-144-34-242.s41.a033.ap.plala.or.jp [153.144.34.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shiro.masm11.me (Postfix) with ESMTPSA id 55F1CC00C6; Thu, 6 Jan 2022 23:56:20 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=masm11.me; s=202002; t=1641480980; bh=8XXqRGAUCE5as/toS7JAa41qHMeRyzehc61yqFlSBlY=; h=Date:To:Cc:Subject:From:In-Reply-To:References; b=vVNrjmatifxaHWiGULmZcF1QJFViOCmIwNBT7T4qgd+m7Bc4HgGb3Ki2Bnrb/Vpcx +ihwipzD7yPbYmZv0Uq3KF1QwgwBSoONK1VW0dbIZh2UHY2xbwnPQJp23gSNBiExGT b4K+fhwVLbERzJroU5KmW+z2NMCB6XaJvKsMYu/I= Date: Thu, 06 Jan 2022 23:56:17 +0900 (JST) Message-Id: <20220106.235617.1013151202943040802.masm@luna.pink.masm11.me> From: Yuuki Harano In-Reply-To: <87mtkrm76b.fsf@polaris64.net> References: <87mtkrm76b.fsf@polaris64.net> Organization: Ingage Inc. X-Mailer: Mew version 6.8 on Emacs 29.0 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Jan__6_23_56_17_2022_371)--" Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) 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 (-) ----Next_Part(Thu_Jan__6_23_56_17_2022_371)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Thu, 23 Dec 2021 19:51:09 +0000, Simon Pugnet wrote: > I've noticed a strange performance issue with Emacs when built > --with-pgtk, but only when global-flycheck-mode is called during Emacs > start-up. Please try the attached patch. -- Yuuki Harano ----Next_Part(Thu_Jan__6_23_56_17_2022_371)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="keypress-delay.diff" diff --git a/src/xgselect.c b/src/xgselect.c index 674c259db7..14a8c73541 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -96,10 +96,21 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1; int i, nfds, tmo_in_millisec, must_free = 0; bool need_to_dispatch; +#ifdef HAVE_PGTK + bool already_has_events = false; +#endif context = g_main_context_default (); acquire_select_lock (context); +#ifdef HAVE_PGTK + { + int errno_back = errno; + already_has_events = g_main_context_pending (context); + errno = errno_back; + } +#endif + if (rfds) all_rfds = *rfds; else FD_ZERO (&all_rfds); if (wfds) all_wfds = *wfds; @@ -146,10 +157,41 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, tmop = &tmo; } +#ifndef HAVE_PGTK fds_lim = max_fds + 1; nfds = thread_select (pselect, fds_lim, &all_rfds, have_wfds ? &all_wfds : NULL, efds, tmop, sigmask); +#else + /* + On PGTK, when you type a key, the key press event are received, + and one more key press event seems to be received internally. + The second event is not via a socket, so there are weird status: + - socket read buffer is empty + - a key press event is pending + In that case, we should not sleep, and dispatch the event immediately. + Bug#52761 + */ + if (!already_has_events) + { + fds_lim = max_fds + 1; + nfds = thread_select (pselect, fds_lim, + &all_rfds, have_wfds ? &all_wfds : NULL, efds, + tmop, sigmask); + } + else + { + /* Emulate return values */ + nfds = 1; + FD_ZERO(&all_rfds); + if (have_wfds) + FD_ZERO(&all_wfds); + if (efds) + FD_ZERO(efds); + our_fds++; + } +#endif + if (nfds < 0) retval = nfds; else if (nfds > 0) ----Next_Part(Thu_Jan__6_23_56_17_2022_371)---- From unknown Fri Aug 15 04:03:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52761: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up Resent-From: Simon Pugnet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2022 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuuki Harano Cc: 52761@debbugs.gnu.org Reply-To: Simon Pugnet Received: via spool by 52761-submit@debbugs.gnu.org id=B52761.164148191215559 (code B ref 52761); Thu, 06 Jan 2022 15:12:02 +0000 Received: (at 52761) by debbugs.gnu.org; 6 Jan 2022 15:11:52 +0000 Received: from localhost ([127.0.0.1]:41934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5UQi-00042t-Gu for submit@debbugs.gnu.org; Thu, 06 Jan 2022 10:11:52 -0500 Received: from mail-4018.proton.ch ([185.70.40.18]:43394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5UQe-00042d-Sw for 52761@debbugs.gnu.org; Thu, 06 Jan 2022 10:11:51 -0500 Date: Thu, 06 Jan 2022 15:11:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net; s=protonmail2; t=1641481902; bh=VsVF79qE/2nFtPKObO3yGQPWqsl3Gw7hEH+LVqPURKc=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=PgOmdLKYzSxBt45LwguFG05ufGP8lkhjJh9gSxZpR41yj/NZOojZOKlzK/cgE7hhV xqhLULmonTt9WTUVow5tArnsATMdYLnEFkCRAOv6aPlWgNq7ziOvhyNfD1akkcD0py C2B3q1oHpdv1A6Tjm8qNeR1b0aoq+edQ/o/MOsGo9nT1VkkrxuVoebIn8pH0ZZnGfF wac1r7NhmZvUVQIJUkOd85lRLbsC22vOn5Tecxitu8qWzQeHDX8aMGQKq7KKk+fK3C rQqlHurvClh3TfMZMCFY0qteuUCkUVcQvuRfzWXlus/EHxaY3oJPpZv6SuLEXZieBd NTS9q3sjdM0Qw== From: Simon Pugnet Message-ID: <87o84orja7.fsf@polaris64.net> In-Reply-To: <20220106.235617.1013151202943040802.masm@luna.pink.masm11.me> References: <87mtkrm76b.fsf@polaris64.net> <20220106.235617.1013151202943040802.masm@luna.pink.masm11.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_fUJggAdRuRwIw5dZcOFpYyX7wzrmprrM3BZHjePGAo" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.0 (/) 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 (-) This is a multi-part message in MIME format. --b1_fUJggAdRuRwIw5dZcOFpYyX7wzrmprrM3BZHjePGAo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Yuuki Harano" writes: > On Thu, 23 Dec 2021 19:51:09 +0000, > =09Simon Pugnet wrote: >> I've noticed a strange performance issue with Emacs when built >> --with-pgtk, but only when global-flycheck-mode is called during >> Emacs >> start-up. > > Please try the attached patch. That patch seems to resolve the problem for me! Thank you for looking into this bug. Kind regards, -- Simon Pugnet https://www.polaris64.net/ --b1_fUJggAdRuRwIw5dZcOFpYyX7wzrmprrM3BZHjePGAo Content-Type: application/pgp-signature; name=attachment.sig Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=attachment.sig LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaVFKSUJBRUJDQUF5RmlFRU8vZUYzaFlz QU1qN1RhYjl1aE5acUN3TFB2a0ZBbUhYQnFBVUhITnBiVzl1UUhCdg0KYkdGeWFYTTJOQzV1WlhR QUNna1F1aE5acUN3TFB2bExWZy8vYUR5RGlXYW92WFhNQmZUMmdBR1pOZnZUQnJ2cA0KMnVEODd6 N1JWS0lBMWZnbWNuVkxkNWIyY1RWZ2xMR3pLTmZmdkptQnZHcDlqOTd1QndCNmh4QkFhbmorckt6 bg0KbEYyUDF0NHBScXRxcFhoMUpXR2RCenNyVCsvSWFPdW54V3JuVjZycVBWKzBUZEVkUVdKM0l5 Uks4N1JuQ3dtRg0KdllEbGhGd0xsdDFLakV2SVJFNkZJWDJTV1YxMjlHcU9LQlhveHMyMGNia2tE eWpaNy9QOTJ5UE9jb0FWa1JCMg0KZGVXOS8xYTJmSS9kU215bWRBM1RBZ0tPdjg0OXFYN216MHlM UUM1OWNpcThLN05Ib3VaTDc5REFSOUFhdFN0Nw0KKzl3RytHcTNaK1NwVnEzbU9ISEZjVnVtWmVL eGhOM0R3WnF0Mm9NRWJoUVRXRnhCOVkrVHhGdUZkOFZiUVZINA0KUzdPb0k0bXNtZjBNN3NXOFBM WENMV05nd0JnOXF3YVA5amVYak12L3JSNm1uVmR6Rk1OT2x2Z1BiaVhRUGN4TQ0KRW5ST0J0Yy9k UE1TaWl2RExZcThHeXNTM0pKVUZ5Q3dvN0U3SmdQVXNHckN5aFZuOFR0ZUsvWk1zWGhUOW94Sg0K K2NnMEVsRU1QNkFLdmllRTNLZ3VKOGRSMEVTL0s5bzdqVVNxZTcrbVJYcUlzc0p5NFdISnZtbXZB R3hXdnYxQw0KWk9pb0FMdGI0T1U1UlBRNTlubm5mbkloamYyZ2dIaGRIUUROTTBoTmFxWWpCaC92 L0laSHVheU4vL1k5eG95WQ0KSjVaazA3OGVWM0dITkpNK1hGZWVuSEQ2U2V1Z0hZbnVzRmZRVE9l KyttdnVuUFZram5USVU4cXo3RUluK2dMNg0KYXV6dXFEWmJGVElmdTdJPQ0KPWxXMW8NCi0tLS0t RU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ== --b1_fUJggAdRuRwIw5dZcOFpYyX7wzrmprrM3BZHjePGAo-- From unknown Fri Aug 15 04:03:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Simon Pugnet Subject: bug#52761: closed (Re: bug#52761: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up) Message-ID: References: <20220108.000108.1796982978972793697.masm@luna.pink.masm11.me> <87mtkrm76b.fsf@polaris64.net> X-Gnu-PR-Message: they-closed 52761 X-Gnu-PR-Package: emacs Reply-To: 52761@debbugs.gnu.org Date: Fri, 07 Jan 2022 15:02:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1641567721-31598-1" This is a multi-part message in MIME format... ------------=_1641567721-31598-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #52761: 29.0.50; (--with-pgtk) poor point movement performance when global-= flycheck-mode is called during start-up which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 52761@debbugs.gnu.org. --=20 52761: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52761 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1641567721-31598-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 52761-done) by debbugs.gnu.org; 7 Jan 2022 15:01:20 +0000 Received: from localhost ([127.0.0.1]:45680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5qk4-0008Cf-HY for submit@debbugs.gnu.org; Fri, 07 Jan 2022 10:01:20 -0500 Received: from shiro.masm11.me ([150.95.182.25]:50468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5qjy-0008CL-LK for 52761-done@debbugs.gnu.org; Fri, 07 Jan 2022 10:01:19 -0500 Received: from luna.pink.masm11.me (i153-144-34-242.s41.a033.ap.plala.or.jp [153.144.34.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shiro.masm11.me (Postfix) with ESMTPSA id 67642C00F0; Sat, 8 Jan 2022 00:01:09 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=masm11.me; s=202002; t=1641567669; bh=Q91eajvnKTIXodnIzlkMnXuos1cVaDCecrdyBnCqiYs=; h=Date:To:Cc:Subject:From:In-Reply-To:References; b=kTnPLRU+Lyyhfv6j//louxzxbs+NhtQwy57vgxbh9XEm8XrWNNZ1X1GzUrESFYmf0 Q9RUxz36k0Nl/5RhqvU3lByG1SCfyBZ2a5W+UXFHPJUfuCshKU6DfJht2g4u0v8jjN XRJ0bVGxdnaMxvsZN6iv2Et6Dy9RzOqbxkuJ0Vtg= Date: Sat, 08 Jan 2022 00:01:08 +0900 (JST) Message-Id: <20220108.000108.1796982978972793697.masm@luna.pink.masm11.me> To: simon@polaris64.net Subject: Re: bug#52761: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up From: Yuuki Harano In-Reply-To: <87o84orja7.fsf@polaris64.net> References: <87mtkrm76b.fsf@polaris64.net> <20220106.235617.1013151202943040802.masm@luna.pink.masm11.me> <87o84orja7.fsf@polaris64.net> Organization: Ingage Inc. X-Mailer: Mew version 6.8 on Emacs 29.0 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52761-done Cc: 52761-done@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 (-) On Thu, 06 Jan 2022 15:11:33 +0000, Simon Pugnet wrote: > That patch seems to resolve the problem for me! Thank you for looking > into this bug. Thanks for the confirmation. I fixed on master, and I'm closing this issue. -- Yuuki Harano ------------=_1641567721-31598-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Dec 2021 19:51:30 +0000 Received: from localhost ([127.0.0.1]:35025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0U7e-0004yJ-Cy for submit@debbugs.gnu.org; Thu, 23 Dec 2021 14:51:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:46774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0U7c-0004yB-Es for submit@debbugs.gnu.org; Thu, 23 Dec 2021 14:51:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0U7c-00024q-5m for bug-gnu-emacs@gnu.org; Thu, 23 Dec 2021 14:51:28 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:60586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0U7Y-0008Uu-2A for bug-gnu-emacs@gnu.org; Thu, 23 Dec 2021 14:51:27 -0500 Date: Thu, 23 Dec 2021 19:51:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net; s=protonmail2; t=1640289073; bh=hpwCuzCCxdEA+3BObnNM47xLk4NuGdpzwkuNLJN1d3Q=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=fUQTdbxD7gUuTnwd/5BkZn3zk5OFb/saFq4tv4Eyh9ZtlVwGtGYFihnXFNxE53UyH 8OiCR6gtTzAOIr96/DiEW6igFqkQ+mOBnH4GdOAzVCv2jRpbJLAlY29WIB0HfPrcYg uX8NJBU6L5tmQdbntRjWZxJNPWcL6xRo0+WuuKL7JRIEyUJ9YyS9PLH0O0FzTrT/E5 jl1u0NhCfN5QVVJT/J982O95t9zrdlv0h1KiYz5v83vXsdnnlvGym3kfs7TFc9CO0N 6ZZ9mUxGLDHTnPmqsvbaK16pZIdzN9OsEkrHQ4qacCuOBkdZW/yEEr8K51wwtOIW8j wznSSkSBMAYEA== To: bug-gnu-emacs@gnu.org From: Simon Pugnet Subject: 29.0.50; (--with-pgtk) poor point movement performance when global-flycheck-mode is called during start-up Message-ID: <87mtkrm76b.fsf@polaris64.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.43.23; envelope-from=simon@polaris64.net; helo=mail-4323.proton.ch 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-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: , Reply-To: Simon Pugnet Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've noticed a strange performance issue with Emacs when built --with-pgtk, but only when global-flycheck-mode is called during Emacs start-up. To reproduce, download and extract the following packages: - - Flycheck: https://melpa.org/#/flycheck - Dash.el (dependency): https://elpa.gnu.org/packages/dash.html Assuming these are at ~/flycheck and ~/dash, perform the following steps: - 1. Create ~/init.el as follows: - #+begin_src emacs-lisp (add-to-list 'load-path (expand-file-name "~/flycheck")) (add-to-list 'load-path (expand-file-name "~/dash")) (require 'flycheck) (global-flycheck-mode) #+end_src 2. Run Emacs, loading this init.el file: "emacs -Q -l ~/init.el" Now, when I use C-n/C-p to move around any buffer, there is a very short but noticeable delay between key-presses and the point actually moving. It's quite easy to notice when compared to the same Emacs run as just "emacs -Q". This only happens when Emacs is built --with-pgtk (and other features as below). If I remove --with-pgtk, this delay disappears. Also, if I do not call global-flycheck-mode during initialisation and instead call it manually at some later stage, the delay also does not appear. It only seems to happen when the global-flycheck-mode call is done during initialisation. Please let me know if there is any more information I can provide. All the best and thanks in advance for your help, Simon In GNU Emacs 29.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2021-12-23 built on tikal Repository revision: 2fa7feca336dd16c57ffef072e0f0da6fffe4c5f Repository branch: master Windowing system distributor 'System Description: Arch Linux Configured using: 'configure --with-native-compilation --with-modules --with-json --with-xinput2 --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB Important settings: value of $LC_CTYPE: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /usr/local/share/emacs/29.0.50/lisp/emacs-lisp/eieio-compat hides /usr/local/share/emacs/29.0.50/lisp/obsolete/eieio-compat Features: (shadow sort mail-extr emacsbug message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 56008 9769) (symbols 48 5662 1) (strings 32 16131 1632) (string-bytes 1 536291) (vectors 16 11510) (vector-slots 8 261217 13969) (floats 8 26 26) (intervals 56 224 0) (buffers 992 11)) --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA Content-Type: application/pgp-signature; name=attachment.sig Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=attachment.sig LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaVFKSUJBRUJDQUF5RmlFRU8vZUYzaFlz QU1qN1RhYjl1aE5acUN3TFB2a0ZBbUhFMHl3VUhITnBiVzl1UUhCdg0KYkdGeWFYTTJOQzV1WlhR QUNna1F1aE5acUN3TFB2bEh2QkFBbWx2eUdsQXZNVTdNb09MSlU2N0lPcE9PbWhUag0KZ1dOVzhk NVdLSnYxejZNekpJeDdSejdvSktXUHNDdzZRd1hoTnZwd2tkRmJ4NkllVmhOMzdCZElsSUtmbmQy Nw0KZkUzb3dGczFlR3lpZ1hmeEMxckNvUEg1S0NmRDFJcERidWNUUFZsOTNUOWl2V3FZMmoyYklT YmJ0dkQ3QlNMbw0Kc0toYTRRMGl2Vk83aHVQMTZOcEpNcjBFVDdDTXcydFgvblpSV1Qrc1lzbzJX MkRQb2VYMnlFZGNwTmJzTEdaWg0KMldJU2JpK0RSQ0JVTlBkQVVCZC83MjNvMHBmQkwzMjhoN3d3 ZmE4U1J6QjVlVC9iaU5yWVc3ejdWY3ZCQUo0MQ0KRGhoR3IrVVNxbnlzTW1qRDhxRW1DZlRZWGpB U0ZwNjIyYXl3dmJIaDRwZSt0aUQ1U0ZHV2ZIekVRVlVnYzBySA0KbmlrK0x2VEpNdG5sNVNkdDE5 azcvUWx0amtoeGljemhLOWRDQWJ2ZjJFN3BuWXRKckQyVTVhZFU5QW9GZXNzYw0KSExGblJ0R1hQ QUhMUjhsMlJiMW00R01WM3ROZ1UyMzhiWU10UEVtTC9mMkxaZUJRTHBESzVpU2hRMzNCLytHOA0K bFdnQkduU2s4Nlo5Rnd1OFAxY0hsREV4aERNTk9oTXpzME04dHNGZDN0S0FqangvOUlCZWlZMGVu d2xwclBMMg0KOVA4OU93eXhBTmNzZTNmVEFjRDdNQ2grRTB3a0UzSzZLTncyYWFnQWJVNHpOcDhI MVVQWVRraDdPanNsNUlCZA0KVlhsdm5CUHYwUit5UllTSVczWUtEQXRzMzZ3NU1DUXBjUlhxN1hX cFk5SlRMOERqemhEU0R2M2N2MEJpcS94QQ0KWHUrYTkzVFBGcFFabVJ3PQ0KPUN2ZUINCi0tLS0t RU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ== --b1_16qcWrZwvdqca4lEJcFX7U2ubfVh88zj88pAliOzyA-- ------------=_1641567721-31598-1--