From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ravine Var Newsgroups: gmane.emacs.bugs Subject: bug#25706: 26.0.50; Slow C file fontification Date: Thu, 10 Dec 2020 22:32:17 +0530 Message-ID: <878sa5twmq.fsf@gmail.com> References: <53CC4F6E-716E-4D4B-8903-F32CCB676163@acm.org> <05F2A660-A403-4B81-AE77-416A739160A7@acm.org> <878sa7h1a2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22741"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.7; emacs 28.0.50 Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen , 25706@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 10 18:21:55 2020 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 1knPdb-0005mr-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 18:21:55 +0100 Original-Received: from localhost ([::1]:59338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knPdZ-00055f-SD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 12:21:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knPV1-0006vM-4l for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 12:13:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knPV0-0001an-Ib; Thu, 10 Dec 2020 12:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knPV0-0001dg-Dx; Thu, 10 Dec 2020 12:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ravine Var Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 10 Dec 2020 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25706 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 25706-submit@debbugs.gnu.org id=B25706.16076203786290 (code B ref 25706); Thu, 10 Dec 2020 17:13:02 +0000 Original-Received: (at 25706) by debbugs.gnu.org; 10 Dec 2020 17:12:58 +0000 Original-Received: from localhost ([127.0.0.1]:39183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knPUw-0001dO-5q for submit@debbugs.gnu.org; Thu, 10 Dec 2020 12:12:58 -0500 Original-Received: from mail-pf1-f172.google.com ([209.85.210.172]:39465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knPUt-0001d9-Rs for 25706@debbugs.gnu.org; Thu, 10 Dec 2020 12:12:56 -0500 Original-Received: by mail-pf1-f172.google.com with SMTP id i3so4706724pfd.6 for <25706@debbugs.gnu.org>; Thu, 10 Dec 2020 09:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:message-id :in-reply-to:mime-version; bh=x4OHgwFPTEGYW7gQ736viVkeS15VSGhZE7cOQdGmJvY=; b=duuE7Y6Yhmmyh3P/QioFjE7h8yO0hrVw++x4Y3PbRMzxSTBpQmX965F2jFX8PZdB8n aaKis01/fRpK5J3Lm04BpljGwD5GDOBIIFuECIvKCToB165ITAEmHHVpqlFEQth3TaTb ZF2uOQUkO+OxJ7rvvfukQCkCfspLveKXMQkrL+pCEgHp70gf2YKfi8NdOfsGJimhagtO gkx/oyAkDwY/UtZP1cj0kznQtfnvXgaZ8WHeSDCvSDZACCMfLaLpIt3hn5E/UeCuWBcz 3zIQ+SyubX8bgFavwMT3GxlZMAEe3mRymI7asM2E8z4vXnOmMEHMW6CvaDS+YP7bEq1E MPEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :message-id:in-reply-to:mime-version; bh=x4OHgwFPTEGYW7gQ736viVkeS15VSGhZE7cOQdGmJvY=; b=HooJNfxbiOcIzZBOrVKMGacxjvEz9cKn52PquhFAuSNOyn8Xsyqy6UpyOaJ0E0uo40 iBOmzFg2iuQzMwvPyftIhA0sKXfehMBkSWS1H1IhJ7GbpFym4/yDVfvgz0NasRiiTZkk HjhtzQRImZGdJjQSgti9i9QUJiWVoVb9fadfuNbOCdSVm5eDy7u7t/z5ZNhxAA4veJhE yVBAO1udacuh2HxbWRqDLOPfG4mkpZ/p+c2Uq2cq2Y5vgUZwn7AyE5TulSu6qFxneh5M 5gCmbsMdxpxRQod3tBQQnh5LRiQGORJrymTDonYvlzNGFKkBp+OX/2/xGILrcnc6k9xf piDA== X-Gm-Message-State: AOAM530TTkGgV1NJCVnFbfRjyni1rJC+xiz1BABs7HN+F01jDFiSMYzv vaFVLFrobwJIeriUBgJMvmqFSWVZyIyb9Q== X-Google-Smtp-Source: ABdhPJwiDbtrCycFPJN9qgYLpEssRHK8On4z0pR8g4fC7YoQ14f5n2bH2kWFtdIlGVJBUmFWQfJ++Q== X-Received: by 2002:a05:6a00:84a:b029:19e:4cc:dc6f with SMTP id q10-20020a056a00084ab029019e04ccdc6fmr7655830pfk.33.1607620368594; Thu, 10 Dec 2020 09:12:48 -0800 (PST) Original-Received: from ryzen-mach ([2409:4072:e87:49af:4b4a:d2e8:6eaf:82aa]) by smtp.gmail.com with ESMTPSA id 14sm6864984pjm.21.2020.12.10.09.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 09:12:47 -0800 (PST) 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" Xref: news.gmane.io gmane.emacs.bugs:195668 Archived-At: > Thank you indeed for taking the trouble to test the patch on the lesser > machine. I do not have access to such a machine. I am assuming that > before this patch, such a large file like osprey_reg....h would have > been completely unworkable on the machine. It sounds as though it still > is. However, have you noticed any improvement at all in performance? There is a marginal improvement - recovery from scroll lockups are slightly faster. But, in general, working with the osprey header file is still very painful. > Could I ask you please to do one more thing, and that is to take a > profile on this machine where it is giving trouble. From a freshly > loaded buffer, move forward (if necessary) to a troublesome spot. N.B. > C-u 1 M-> moves to 10% away from the end of the buffer, C-u 2 M-> 20%, > and so on. Then start the profiler and do what is causing sluggish > performance. Then have a look at the final profiler output, and expand > it sensibly so that the troublesome function can be found. > > (Optional paragraph.) How to use the profiler: Do M-x profiler-start > RET, and accept the default mode with another RET. Perform the stuff to > be profiled. Do M-x profiler-report, which gives three or four lines of > output, each with a number and a percentage. Move point to a line with > a large percentage and type RET to expand it. You can repeat this to > expand further. Please expand the lines down to where the percentages > remaining are around 5% or 6%. There will be quite a lot of lines near > the start showing the same large percentage. I opened the osprey file and started scrolling down and the screen locked up. Here is the profile report (with emacs -Q): https://gist.github.com/ravine-var/0c293968a902cde76af77f2872dde1d7 I am using emacs master (along with your patch) built with LTO enabled and CFLAGS set to '-O2 -march=native'.