From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#24048: 25.0.95; syntax-ppss can be slow Date: Wed, 01 Dec 2021 20:47:44 +0100 Message-ID: <87o860f6ov.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13523"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 24048@debbugs.gnu.org, Dmitry Gutov To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 01 20:48:15 2021 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 1msVaR-0003Gz-59 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 20:48:15 +0100 Original-Received: from localhost ([::1]:50566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msVaQ-00037M-6E for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 14:48:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msVaE-00033W-32 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 14:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msVaD-000603-R3 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 14:48:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msVaD-0005qV-P4 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 14:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Dec 2021 19:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24048 X-GNU-PR-Package: emacs Original-Received: via spool by 24048-submit@debbugs.gnu.org id=B24048.163838807422442 (code B ref 24048); Wed, 01 Dec 2021 19:48:01 +0000 Original-Received: (at 24048) by debbugs.gnu.org; 1 Dec 2021 19:47:54 +0000 Original-Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msVa6-0005ps-4h for submit@debbugs.gnu.org; Wed, 01 Dec 2021 14:47:54 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:57800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msVa4-0005pH-Qx for 24048@debbugs.gnu.org; Wed, 01 Dec 2021 14:47:53 -0500 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=sGGWBEFOnaYcxOBM6Ih38MVEjOBqmkbwp4NTuIFK9H8=; b=A/V4pUMk5RHXulAAVSDK6SR1+M vWFCYHbjYA2iZipkWPeGjvZIyiXSyks+Jo8+PgMh4RME1ILW6kCA/thVaWPo5rjE6B/DSGP5ujXn8 K9LeUAEhvIz/KOMLHXnTPOe9H1R3ceoj/qVqCnCTIMNdGTOVQ3190o6VGKYiDWr826q4=; Original-Received: from [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 1msVZw-00028B-LA; Wed, 01 Dec 2021 20:47:47 +0100 X-Now-Playing: Hyd's _Hyd_: "The Look on Your Face" In-Reply-To: (Aaron Jensen's message of "Fri, 30 Mar 2018 06:09:45 -0700") 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:221230 Archived-At: Aaron Jensen writes: > Ultimately, it seems like it may be worth reconsidering this condition: > > (and old-pos (< (- pos old-pos) > ;; The time to use syntax-begin-function and > ;; find PPSS is assumed to be about 2 * distance. > (* 2 (/ (cdr (aref syntax-ppss-stats 5)) > (1+ (car (aref syntax-ppss-stats 5))))))) (I'm going through old bug reports that unfortunately weren't resolved at the time.) This bit is now: (if (and old-pos (< (- pos old-pos) ;; The time to use syntax-begin-function and ;; find PPSS is assumed to be about 2 * distance. (let ((pair (aref syntax-ppss-stats 5))) (/ (* 2 (cdr pair)) (car pair))))) I.e., the last clause is gone. I don't know whether this affects the issue you were seeing, though. Is syntax-ppss still mis-caching things for you? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no