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#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Date: Sun, 14 Aug 2022 23:55:46 +0800 Message-ID: <87bksmx1j1.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="2400"; mail-complaints-to="usenet@ciao.gmane.io" To: 57207@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 14 17:55:46 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 1oNFxp-0000P1-C3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 17:55:45 +0200 Original-Received: from localhost ([::1]:41742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNFxo-0001dY-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 11:55:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNFx8-0001bq-Hz for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNFx8-0007JD-8u for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNFx8-0000Q1-3Z for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:55: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: Sun, 14 Aug 2022 15:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57207 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16604924931582 (code B ref -1); Sun, 14 Aug 2022 15:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Aug 2022 15:54:53 +0000 Original-Received: from localhost ([127.0.0.1]:39560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNFwy-0000PR-UK for submit@debbugs.gnu.org; Sun, 14 Aug 2022 11:54:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNFwv-0000PG-7x for submit@debbugs.gnu.org; Sun, 14 Aug 2022 11:54:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNFwv-0001ao-1O for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:54:49 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:45631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNFwt-0007Hb-Cp for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 11:54:48 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id 13so4550880plo.12 for ; Sun, 14 Aug 2022 08:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc; bh=1SdEtrZnUXId74Sy/ypseOHj8dAFgCmMmjzPNetOldE=; b=jIaJqUYSPm3wSZpF50hvjTpYBRhKIKx7f/3HydvbG4hZHryefJQTSGVE+v6EpO3wPA fnCR24HygX94KPnGBj+6TCTAIpgY1lA1XRMgF4n3wzAH9SB7B4MMMDamOhLK2aww2l8T /b6qqdZrgdYMgmDMBAaOTJUFLotlXDwhRmq7pjGj+i786VpmayAOYfJycono94p5lmha 2vbV6Vqa/XpIitQ/3e3BDdv8oqnC0ApwX9JbEq0O394HubCXs89RRTuNXEj5Or7xTV7D itDGZ/R8yDrL7PrGQ8T6sT+4GCR06SEPjH1RpddaE+r00uMwZnOmB4xj/sARx1YydAi9 8wsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc; bh=1SdEtrZnUXId74Sy/ypseOHj8dAFgCmMmjzPNetOldE=; b=vkK/3UBJFRqMByVHqzDa6fwHFqtsImVnj3cx3he63huzYBnBlxEqZqB/FVoCl6hK6x YmVpHjlkOhqrc8C3GW01GLphS0FzujI68HCjt4ANPrsCC8kuu4xDicU5BSTOIHmQus9w UkBHWa8bKrJevM/TuVAvKCCfpFk8UE/kCwt9TurxFwznDZn1xEm7WzSNoW0N5bI0/KSv wJNnLadq+LQZUR8Wknt0Ibo/lUBbiwUvjW1BYAO5l+3ZA8DByWkTVH5wUk0S+1v1Vl6X 4d+aZinB5kUh2RspS5sZZcjMvdqFMfQPOqcIAYsv0yivqD/c1VF3m+vAov0fzOgu2RlF T1/A== X-Gm-Message-State: ACgBeo12aF0l9C76b0Vg7r36YNS71U4zvYQAjzuohW8td/tNU4kF+Phq 1NJaVOIkZhGSgBrqtxayG1JOxBdL+6U= X-Google-Smtp-Source: AA6agR6Iuz3ZTCAJttBnwReMSD8ooW43WLT8HjE6dnRZnc8uGJ9NXNGfHL/wABP/RfWSsFuSyusTrA== X-Received: by 2002:a17:903:124b:b0:172:614b:2335 with SMTP id u11-20020a170903124b00b00172614b2335mr5147103plh.165.1660492485652; Sun, 14 Aug 2022 08:54:45 -0700 (PDT) Original-Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id h6-20020a17090a604600b001ec92575e83sm3247765pjm.4.2022.08.14.08.54.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 08:54:45 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yantar92@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:239656 Archived-At: I am experiencing severe performance degradation on current master. The degradation happens when working with Org files and I managed to bisect the cause down to e7b5912b235936b304701ba6b1e808d9b197fd4f is the first bad commit commit e7b5912b235936b304701ba6b1e808d9b197fd4f Author: Gregory Heytings Date: Sat Jul 16 19:06:38 2022 +0000 Improvements to long lines handling. * src/buffer.h (struct buffer): New field 'long_line_optimizations_p'. * src/buffer.c (syms_of_buffer): New variable 'long-line-threshold'. (reset_buffer): Initialize the 'long_line_optimizations_p' field. (Fbuffer_swap_text): Handle it. ... I tried M-x profiler to find the cause, but the 3-4 second hangs are not reflected in the profiler report. debug-on-entry + manual stepping through the function revealed that the hang happens when calling jit-lock-fontify-now. I was able to trigger the slowdown when unfolding headlines hidden using 'invisible text property. Do you have any idea what could be going wrong or how to debug things further? -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92