From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#62352: Very slow scroll-down-line with a lot of text properties Date: Sat, 25 Mar 2023 14:41:04 +0100 Message-ID: References: <51545b85-029c-a6ff-f733-e486f261f6c0@gmail.com> <83355x7sx2.fsf@gnu.org> <08b5f766dd5d453016a7@heytings.org> <83sfdtcab8.fsf@gnu.org> <83h6u9c89f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Cc: gregory@heytings.org, 62352-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 25 14:42:20 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 1pg49z-0009dD-L1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 14:42:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg49k-000734-OC; Sat, 25 Mar 2023 09:42:04 -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 1pg49j-00072c-8R for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:42:03 -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 1pg49j-000767-0H for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pg49i-00071P-Io for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2023 13:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62352 X-GNU-PR-Package: emacs Original-Received: via spool by 62352-done@debbugs.gnu.org id=D62352.167975167426933 (code D ref 62352); Sat, 25 Mar 2023 13:42:02 +0000 Original-Received: (at 62352-done) by debbugs.gnu.org; 25 Mar 2023 13:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:42193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg48w-00070L-Eq for submit@debbugs.gnu.org; Sat, 25 Mar 2023 09:41:14 -0400 Original-Received: from mail-ed1-f46.google.com ([209.85.208.46]:39466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg48t-000707-T6 for 62352-done@debbugs.gnu.org; Sat, 25 Mar 2023 09:41:12 -0400 Original-Received: by mail-ed1-f46.google.com with SMTP id ek18so18370025edb.6 for <62352-done@debbugs.gnu.org>; Sat, 25 Mar 2023 06:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679751666; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZUoyXjsZESf3UOS81x+MtlvIjcUTWxnghMXTyk6gaY8=; b=os7Sv1GmglT3f8T6F/VCGRXrSaH68pD8sCeKGQyM0P585y9wX7TYw1EyBgxo4Bbd/d ctO14It2DB2WCcjoocki9X6gfq27PYtjr/fnHnjFqoBem7n8SXOaivYQQluPVivi6pax p9x5gxT0mFDsDglvTuqN43gGjK0BH6Z6wEH4eAV+y2NwYAUrv7eTbTFs0WbQPqMWowWw 5FfGiJE98M2vTTX+eqY+WlQvSKUCjmF/J69uWBX+iMQn9k4Q7nkMessbhBO06jdNqhn0 BbGcw7oMh7k55cXwnqk7Gt7poBUbnoB/I8ZxqJIlf1UK2dkaHH94BLboRW+LmiYFOUNe iYnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679751666; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZUoyXjsZESf3UOS81x+MtlvIjcUTWxnghMXTyk6gaY8=; b=M50Nq/u5J3ZDdR2IMHJbKOxslZhbhQKqQFF9KxlMyxNV4gcyXnjedGJGdtqMqVJxDv zb1tJ5inYuf65uxzoa3GjDpMKlxCkC8iq8jK/PbAgDmXP5Eg5yOHhfMDHW+lT1Mn35F5 /sVWEeIGKxITrsO1tg99oN+5nbObyYLrfrJv2UxveIj8FqcnTvumg9FlmikvXnM9jZLt Ts1HHnNHLbhY4aG58nFP3Zod4dIrYG+lo6J4QjsgXKZSHd1q6anclhH324UNt0cKBE7o 8dhxQIo2jWTuOzRaguzwzL6GMg8CJBHgeFo6UTF9ky9bPQhfecTwFYd0Fw6OBM+Ai/aA 9nRw== X-Gm-Message-State: AAQBX9eDqNM2xBikqj3cOLUKa1+fVDWixgjifr292+Y1IQehyEJMaz2y ORHrjcS1mOZG39C91OOXd+E= X-Google-Smtp-Source: AKy350b6KxD7zRiJRRb0Ba/NBZY06hjaXCWyf4FmPy+Okv0NA/EfPgoa7MoNwVMmeJz1VxqPlcO2XQ== X-Received: by 2002:a05:6402:4c:b0:4c0:1120:a15d with SMTP id f12-20020a056402004c00b004c01120a15dmr5980973edu.5.1679751665785; Sat, 25 Mar 2023 06:41:05 -0700 (PDT) Original-Received: from [192.168.8.4] (netacc-gpn-204-88-167.pool.yettel.hu. [5.204.88.167]) by smtp.gmail.com with ESMTPSA id r12-20020a50c00c000000b00501d2f10d19sm7830492edb.20.2023.03.25.06.41.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Mar 2023 06:41:05 -0700 (PDT) Content-Language: sv-FI In-Reply-To: <83h6u9c89f.fsf@gnu.org> 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:258568 Archived-At: On 3/25/23 13:42, Eli Zaretskii wrote: >> I analyzed the issue little bit, the root cause of the slowdown is >> composition handling (yet the composition feature is completely unused >> by this example). >> >> If I comment out these lines in composition_compute_stop_pos(), emacs >> works better ("normal" scrolling becomes completely fluid, >> scroll-down-line still freezes, but for a much shorter time): >> >>   /* if (charpos < endpos */ >>   /*     && find_composition (charpos, endpos, &start, &end, &prop, >> string) */ >>   /*     && start >= charpos */ >>   /*     && composition_valid_p (start, end, prop)) */ >>   /*   { */ >>   /*     cmp_it->stop_pos = endpos = start; */ >>   /*     cmp_it->ch = -1; */ >>   /*   } */ >> >> It seems that emacs does a huge amount of redundant work by scanning >> approximately the same area over and over again for composition properties. > This is a non-starter, unfortunately: the display engine _must_ > support character composition, or else some scripts will display > incorrectly, and some features (like prettify-symbols-mode) will stop > working. I'm not saying that this is the solution. I just wanted to point out that emacs does unnecessary work. Note, even with this code commented out, composition still seems to work. Maybe it's buggy, of course. But the point is, it seems possible to fix this performance issue. Maybe it's a lot of work and it doesn't worth it. I understand that if this issue is closed because of this. But saying that this issue is not a (performance) bug is not correct, in my opinion. It is not unreasonable to expect that my example file can be scrolled without any problem. > Get a faster computer, or make your keyboard auto-repeat rate lower? Maybe there is a 2x single-thread performance factor between my computer and a current fast consumer desktop PC. It is highly unlikely that getting a faster computer will solve this problem.