From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Sat, 06 Aug 2022 14:17:55 +0300 Message-ID: <835yj5zkm4.fsf@gnu.org> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <8c7321f2f36494299e61@heytings.org> <83v8rc2n1h.fsf@gnu.org> <64084296-1953-8ef8-5938-adfb6fb9b43f@yandex.ru> <83r11uzs8n.fsf@gnu.org> <14845631-c2ef-8371-8606-c858092e3192@yandex.ru> <83mtcizov2.fsf@gnu.org> <83h72qzheq.fsf@gnu.org> <25717d84-3411-a93a-3620-e04fe0571aff@yandex.ru> <83edxuzemr.fsf@gnu.org> <83a68hzz0a.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36076"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 06 13:19:31 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 1oKHq7-0009Eu-22 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Aug 2022 13:19:31 +0200 Original-Received: from localhost ([::1]:52088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKHq5-0003cL-EB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Aug 2022 07:19:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKHpf-0003bv-7r for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 07:19:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKHpe-000625-W6 for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 07:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKHpe-0002kv-GG for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 07:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2022 11:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.165978469510537 (code B ref 56682); Sat, 06 Aug 2022 11:19:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 6 Aug 2022 11:18:15 +0000 Original-Received: from localhost ([127.0.0.1]:32857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKHos-0002jt-H1 for submit@debbugs.gnu.org; Sat, 06 Aug 2022 07:18:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKHoo-0002jd-7v for 56682@debbugs.gnu.org; Sat, 06 Aug 2022 07:18:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKHoi-0005yS-31; Sat, 06 Aug 2022 07:18:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XdlZQEznO7Sk2+CAYWwqrAYBF/UWgpjCcXEn9mBU8zo=; b=I17bTtZZeLr7 YF6bBeDbCZSMvjN5u8cdoTgTDuA8DOqNaaPsnN4eDjZNgVskpiIJKgTGH3CWSBZwVwaNYUHL4nXXl Uau+G3F4Mt01O67PfbubAo3KGlbAEMxyXr+hn+9s6K26ZzR5Kv1HH4J8PjZwMqfTkXIKcnJZZSHui sHwCvgdUNpFX1u4qPc/lrfsHut8+L4A1eTnEFgPUyCViBgTAVu9ceWylOKBrgLDDAFfSeaehrCkOW AtJUwR9oSNZGcxKIEwGDRLmsD9Vn01s81xDvmaw7uHyKeZcCuXb0BxuO9ch19RNauWAWEnKrlQ32Q /ILUS3cJNdXzMlVaJp9Tow==; Original-Received: from [87.69.77.57] (port=4463 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKHoh-0002wN-A9; Sat, 06 Aug 2022 07:18:03 -0400 In-Reply-To: (message from Dmitry Gutov on Sat, 6 Aug 2022 13:50:41 +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:238967 Archived-At: > Date: Sat, 6 Aug 2022 13:50:41 +0300 > Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca > From: Dmitry Gutov > > >> I'm not seeing any particular sluggishness in these operations when > >> visiting dictionary.json. > > > > Numbers, please. You have a very fast machine, so what doesn't look > > sluggish on your system could very well be so on others. > > How do you measure these operations including the redisplay lag? By timing them. With benchmark-run or similar, if it isn't slow enough to be measured "by hand". > > Linear scaling is less optimal than O(0), which is what the current > > solution produces. > > Correct syntax highlighting requires parsing the buffer from the > beginning. Otherwise we get random results, essentially. > > Just like depicted on my latest screenshot for downloadify.js: the > beginning of the narrowed region ended up inside a string, and as a > result several screenfuls were entirely mis-fontified, with strings and > non-strings inverted. Yes, and IMNSHO responsiveness is more important than correctness in these cases.