From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57245: 29.0.50; M-> in a large XML file (without long lines) is slow Date: Wed, 17 Aug 2022 09:20:28 -0400 Message-ID: References: <18035574-1b50-62f4-7605-8cdb33204535@yandex.ru> <83tu6cdt7l.fsf@gnu.org> <913e0b46-7145-d39d-1fcd-bc17094e28f2@yandex.ru> <83fshvdsfi.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9279"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57245@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 17 15:21:12 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 1oOIyu-0002Dx-06 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 15:21:12 +0200 Original-Received: from localhost ([::1]:53842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOIys-0008CL-SK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 09:21:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOIyk-0008Bc-Q6 for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOIyk-0004hY-HB for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOIyk-0001bA-D2 for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Aug 2022 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57245 X-GNU-PR-Package: emacs Original-Received: via spool by 57245-submit@debbugs.gnu.org id=B57245.16607424426093 (code B ref 57245); Wed, 17 Aug 2022 13:21:02 +0000 Original-Received: (at 57245) by debbugs.gnu.org; 17 Aug 2022 13:20:42 +0000 Original-Received: from localhost ([127.0.0.1]:49793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOIyQ-0001aD-3a for submit@debbugs.gnu.org; Wed, 17 Aug 2022 09:20:42 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOIyL-0001Zx-GL for 57245@debbugs.gnu.org; Wed, 17 Aug 2022 09:20:41 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CBD21100138; Wed, 17 Aug 2022 09:20:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 38E5A100091; Wed, 17 Aug 2022 09:20:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660742430; bh=rBaXRSIs5Iki9erD04P6Edv5dXhMXyCDrCPr5j2eLcU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=U6ei1AXt6Hh74rSFqPBPmG8RSPopwQoR4q5MgVKLv09ON2/imPqvpfnwB/Vd3l5iW 9o3H90K0lky07qOCnhucJoZ4LySdR7bddxHGSKFs4Nh/p8sxcpXKZWUK8A7RSD/wgy OZnOxthtkDqQQB0Bd3iRjyFl++7I0WJ034gWrineoiBkFJcnwodRHlbRzRRDA4KQfC M93NIGdIvi427O4xSvwHWBPkhPVGSRhJNjQ2x8bxCinfxydzXpCjHTGRtfJhZ63Uoa iws8IE33VoC3BGbgqaK8Z6mGQ5TXCyQng25hb9PlColWyoOCZb/YrwZ905JOnZ7Ikw +Ged7hvQXvaJQ== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0AA2D120250; Wed, 17 Aug 2022 09:20:30 -0400 (EDT) In-Reply-To: <83fshvdsfi.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2022 14:24:01 +0300") 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:240073 Archived-At: >> nxml-syntax-propertize might well be heavier than average, but the delay >> scales linearly with the size of the file. > Which is generally not a good scaling factor, especially if the > coefficient is quite large (as it seems to be in this case). For most languages, this is the minimum scaling factor that allows the result to be correct in all cases. So, as a general rule, it should be considered as a good scaling factor, I think (when seen as a judgment on the implementation quality of a major mode). Obviously, that won't work well in really large buffers, but to a large extent that should be blamed on the language rather than its major mode. For this reason, we need to add hacks/heuristics (e.g. not highlighting, accepting occasional broken highlighting, delaying highlighting, younameit) if we want to be able to handle such large buffers in a timely fashion. Stefan