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#58558: 29.0.50; re-search-forward is slow in some buffers Date: Sun, 16 Oct 2022 13:36:26 +0300 Message-ID: <83wn903vit.fsf@gnu.org> References: <877d10r21x.fsf@localhost> <87zgdwyvkt.fsf@gnus.org> <87ilkk6ri5.fsf@localhost> <87v8okjei9.fsf@gnus.org> <87tu44jdce.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58558@debbugs.gnu.org, larsi@gnus.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 16 12:37:14 2022 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 1ok117-00012U-DO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Oct 2022 12:37:13 +0200 Original-Received: from localhost ([::1]:58096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ok116-0007wu-9J for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Oct 2022 06:37:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok110-0007vy-1W for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 06:37:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ok10w-0007vg-Ki for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 06:37:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ok10w-0004zU-Ch for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 06:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58558 X-GNU-PR-Package: emacs Original-Received: via spool by 58558-submit@debbugs.gnu.org id=B58558.166591660919163 (code B ref 58558); Sun, 16 Oct 2022 10:37:02 +0000 Original-Received: (at 58558) by debbugs.gnu.org; 16 Oct 2022 10:36:49 +0000 Original-Received: from localhost ([127.0.0.1]:43485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok10j-0004z0-Ap for submit@debbugs.gnu.org; Sun, 16 Oct 2022 06:36:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok10f-0004ym-Nc for 58558@debbugs.gnu.org; Sun, 16 Oct 2022 06:36:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok10a-0007s8-DT; Sun, 16 Oct 2022 06:36:40 -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=mPKtnQDEUCSAoeFftseRZZS+1NiIPlBh/kxG2IlvFbw=; b=MMMlhR4kgIEY RBnAEFEjkFIHSIcJpeE6Honliw/LHrLVtRe2K317IiWFB2BojYueMLSwPAE6ueEr+dvN8kYTiA0uR v8A8m9UCvesk+fUy4GMmf+QlF68c+2xi/vzYxavkIE8tD7Q5So49f3gEEIV4+Rvsfwz8seCUSdOTj BzEFb7SQWx6HyWHgv0znU3066bScS8S5Ljtb7VkO8Jr9w4xODISNScXq5CrrAl7Bl04pgV90qAHUf d+waGQDUXbuz/lcfY2m8c47TjrxHeD9CRygrSYwtlI7Nxm6FxtYeH3N5nvn6vj1wEe21A6vpOBl7X wMOANwD3XIdc/f4UmNpomQ==; Original-Received: from [87.69.77.57] (port=1751 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok10Z-0004Kd-SY; Sun, 16 Oct 2022 06:36:40 -0400 In-Reply-To: <87tu44jdce.fsf@localhost> (message from Ihor Radchenko on Sun, 16 Oct 2022 10:02:25 +0000) 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" Xref: news.gmane.io gmane.emacs.bugs:245627 Archived-At: > Cc: 58558@debbugs.gnu.org > From: Ihor Radchenko > Date: Sun, 16 Oct 2022 10:02:25 +0000 > > Lars Ingebrigtsen writes: > > > If you switch the buffer to `clean-mode' (which should remove all text > > props), does the slowdown disappear? In that case, it seems likely that > > the slowdown is connected to text properties, somehow. > > The slowdown becomes slightly better, but nowhere close to Emacs 28: > > ;; Emacs 29 > ;; Elapsed time: 16.953404s > ;; Emacs 29 + clean-mode > ;; Elapsed time: 13.290568s > ;; Emacs 28 > ;; Elapsed time: 0.869748s > > I did > > (setq yant/re "\\(?:\\(?:\\\\)\\)\\)\\|\\(?:\\(?:<\\(?:[[:digit:]]\\{4\\}-[[:digit:]]\\{2\\}-[[:digit:]]\\{2\\}\\(?: [[:alpha:]]+\\)?\\)\\(?: [[:digit:]]\\{1,2\\}:[[:digit:]]\\{2\\}\\(?:-[[:digit:]]\\{1,2\\}:[[:digit:]]\\{2\\}\\)?\\)?\\(?:\\(?: [+.:-]\\{1,2\\}[[:digit:]]+[dhmwy]\\(?:/[[:digit:]]+[dhmwy]\\)?\\)\\{1,2\\}\\)?>\\)\\|^\\*+[[:blank:]]+\\(?:[[:upper:]]+[[:blank:]]+\\)?\\[#A]\\|^[[:space:]]*:STYLE:[[:space:]]+habit[[:space:]]*$\\)\\)") > (benchmark-progn (goto-char (point-min)) (while (re-search-forward yant/re nil t))) AFAICT, the changes in regex-emacs.c between these two versions are very minor, almost non-existent. So it sounds like the reason is somewhere else, not in regexp search per se. But to be absolutely sure, could you please try building Emacs 29 with regex-emacs.c from Emacs 28, and see if the slowdown disappears or not? Thanks.