From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.bugs Subject: bug#63622: lisp/progmodes/python.el: performance regression introduced by multiline font-lock Date: Tue, 23 May 2023 12:04:16 -0700 Message-ID: References: <83zg5yqkr1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37215"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , 63622@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 23 21:05:30 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 1q1XK6-0009Wo-BE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 May 2023 21:05:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1XJm-0007KR-OW; Tue, 23 May 2023 15:05:10 -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 1q1XJi-0007Ic-VK for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 15:05:07 -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 1q1XJe-0003Fa-IB for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 15:05:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1XJd-0007c1-S9 for bug-gnu-emacs@gnu.org; Tue, 23 May 2023 15:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Gillespie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 May 2023 19:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63622 X-GNU-PR-Package: emacs Original-Received: via spool by 63622-submit@debbugs.gnu.org id=B63622.168486867529222 (code B ref 63622); Tue, 23 May 2023 19:05:01 +0000 Original-Received: (at 63622) by debbugs.gnu.org; 23 May 2023 19:04:35 +0000 Original-Received: from localhost ([127.0.0.1]:40429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1XJC-0007bG-R8 for submit@debbugs.gnu.org; Tue, 23 May 2023 15:04:35 -0400 Original-Received: from mail-yb1-f178.google.com ([209.85.219.178]:60706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1XJB-0007b3-6D for 63622@debbugs.gnu.org; Tue, 23 May 2023 15:04:33 -0400 Original-Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-b9daef8681fso62885276.1 for <63622@debbugs.gnu.org>; Tue, 23 May 2023 12:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684868667; x=1687460667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oEsi5K/6dzDR5DZn8gHg6hwKecUE2AImvJiHj6aEMiY=; b=ACL0vgmgN09q71OttJ1QC+b5Gr51clHg6eY5YL2I6S/u2qaNCA/QIBF/wCKC7HYzQf HgUGtnAioIFRtzb3evwvruNsl8MN05YrrsxuydUwCd6dNWzyanresJBPWzprzdQUlyqm D4EIx3yCHt+dWXirddv6BxX7T++SVlDmopJe0P2ch7D22a3HZ5LOV4VRiwtvFR088A5k t0zAdC1LWhDs8TFz9/h19+bUJLmnrsC9oQgfCKQEqlHtVY7pdGbjie3nvxZDmFXrJ1yr BG+Zx7cbdr3vn6+KWcHfxhkQgNLCsvOQKkEhWAIgMHVep44EEsyj5WG+33TrK1L5rH/b 9oGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684868667; x=1687460667; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oEsi5K/6dzDR5DZn8gHg6hwKecUE2AImvJiHj6aEMiY=; b=jUO7/DeJrDvZgqdC0ptUfTOpEi2Dzo6Og3I1Cail1vUPHFeoKOQvt33c8ZSakKVXj5 /h7aPvlfxHey3YRpgVbFxbhi89uV44nLu+uSrDRKi3B4RLi8sjIkiqOkXnbDgVO/3Qgf jGC0OZ7cxg8nheee0Ob0I5ruppCaLVsPJFP2L2tGyu8prntRsiGWtXALueCaqvuyTrJa /hObb+CSAVgtjMtFiw5qauWgMnY4poFQoozwp3oQDYBWaY4Bpy2PNdy5ZyV/S4tatS8P yGFiYgKK/E02zRJHawLU51ocJpbGDEII1SRb7JClzuKuffCr9hBqLmr71PCa5w2L2xjq s3gg== X-Gm-Message-State: AC+VfDwHeHeEVUZ0Smq6J/lIVt7LBSZQC9qxAR+XLLoZNxvHsfn9YH59 1FVA+2cqUqFCm9wXx12Kl9k1W/mvxevAXBPNGUQ= X-Google-Smtp-Source: ACHHUZ5wTQkOxEdjCkqK7c5vmPXc7MKgfsZgeyfhYGO8OM+2hM2tiEDfVz+wDQWdbN6qPmgMHWDc3zDYy33TBAI+pP4= X-Received: by 2002:a25:ea44:0:b0:ba2:6aea:2ba with SMTP id o4-20020a25ea44000000b00ba26aea02bamr13353230ybe.23.1684868667349; Tue, 23 May 2023 12:04:27 -0700 (PDT) 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:262250 Archived-At: I have tested the two patches and the performance is dramatically improved. > One of the problems is that string-delimiter matches even if there is > a single character preceding the string. I agree with the assessment about docstring syntax. The fix in Fix-python- is ok and fixes the font-locking performance in general. The general issue with the definition of string-delimiter is something that might need to be considered in the future if another perf issue crops up, but for now I think it is safe to leave it alone since docstring detection was the only place where it seems to be causing issues. While we're here I think [fF]? should probably be included in the prefix since format strings are also valid docstrings. Thank you very much for digging into this! Tom