From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers Date: Wed, 12 Apr 2023 14:39:08 +0000 Message-ID: <8735559ncj.fsf@localhost> References: <877d10r21x.fsf@localhost> <83h6xzphxm.fsf@gnu.org> <87wn6vbfaa.fsf@localhost> <838rjbpecw.fsf@gnu.org> <87fsdjwb4e.fsf@localhost> <874jtyuqax.fsf@localhost> <83zgbqm8q6.fsf@gnu.org> <87sfhit8ug.fsf@localhost> <83tu1ym6jo.fsf@gnu.org> <87h6xyt77x.fsf@localhost> <87h6ttkz6n.fsf@localhost> <838rf5qkpt.fsf@gnu.org> <87lej0zv92.fsf@localhost> <83ttxol6f5.fsf@gnu.org> <87h6tolybs.fsf@localhost> <87zg7e8xnt.fsf@localhost> <83ttxmab7x.fsf@gnu.org> <87sfd5b4oy.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29842"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58558@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , larsi@gnus.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 16:37:26 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 1pmbbA-0007TQ-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 16:37:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmbau-0006sT-6r; Wed, 12 Apr 2023 10:37:08 -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 1pmbap-0006sD-3A for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 10:37:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmbao-0002P6-Rh for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 10:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmbao-00030s-Go for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 10:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 14: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.168131021811572 (code B ref 58558); Wed, 12 Apr 2023 14:37:02 +0000 Original-Received: (at 58558) by debbugs.gnu.org; 12 Apr 2023 14:36:58 +0000 Original-Received: from localhost ([127.0.0.1]:40578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmbaj-00030a-KK for submit@debbugs.gnu.org; Wed, 12 Apr 2023 10:36:57 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:37721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmbag-00030H-6E for 58558@debbugs.gnu.org; Wed, 12 Apr 2023 10:36:56 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2BF6F240468 for <58558@debbugs.gnu.org>; Wed, 12 Apr 2023 16:36:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681310208; bh=0DfdMqhqzrpf4NirbE8Sriz8DFmphqXLsfq2cX4n7Nw=; h=From:To:Cc:Subject:Date:From; b=JnWd7bsis1Ii8+O0k9IUGBSm+vo0VHoGTGwd61PevzdSqisOsqL22K4dxEQTvoAF4 xwQyQYVRBeetjJ9vGDiD4qeAzJObQoAyTtDQr+SV5Y5s7rFbM5YOcHxd/WxFB2Db8q t7PDWJJtTc72F8tZHVvUH9Rjw3E9inuqF3zwPoF3Fjb9V5KEDgL8e90NJBGaffeTvu cq6UnDQiTcSYrGgQ1Y/mI93KiP6YEI60dDF2zHQLrBM+RP51bqebs3I9lBXQifsJSx Cz6AEBOeZIUNfoQOMUaHvgRD0RWbS5BT/LMy4MgIsHRkx/epialcDcK7Fz7miwt+3H D25TwXDgfJcMg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PxQJb220bz9rxL; Wed, 12 Apr 2023 16:36:47 +0200 (CEST) In-Reply-To: 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:259752 Archived-At: Stefan Monnier writes: > I suspect that the patch below might fix the immediate problem. I confirm that it does fix the problem. But why not `with-temp-buffer'? Also, how come `setq' changes the global variable value despite it is let-bound? > Of course, setting `parse-sexp-lookup-properties` should not have such > a major performance impact, so maybe we should keep digging into > the problem. Agree. I was considering `parse-sexp-lookup-properties' in Org, but this issue will be a blocker. To improve the performance, the two obvious ways are reducing the number of SYNTAX_TABLE_BYTE_TO_CHAR calls in re_match_2_internal and speeding up buf_bytepos_to_charpos. I'd prefer the latter as it is used ubiquitously across Emacs and making point lookup faster will thus benefit other places as well. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at