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#51995: 29.0.50; `string-pixel-width' depends on the current window width Date: Sun, 21 Nov 2021 08:34:34 +0200 Message-ID: <83ee7arp8l.fsf@gnu.org> References: <84czmvbepd.fsf@gmail.com> <84h7c67bdi.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51995@debbugs.gnu.org To: Brahimi Saifullah Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 21 07:35:12 2021 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 1mogRT-00077G-1j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 07:35:11 +0100 Original-Received: from localhost ([::1]:38360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mogRR-0007p4-90 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 01:35:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mogRK-0007ot-5V for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 01:35:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mogRJ-0007wI-Qt for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 01:35:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mogRJ-0006Dp-OB for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 01:35:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Nov 2021 06:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51995 X-GNU-PR-Package: emacs Original-Received: via spool by 51995-submit@debbugs.gnu.org id=B51995.163747647723866 (code B ref 51995); Sun, 21 Nov 2021 06:35:01 +0000 Original-Received: (at 51995) by debbugs.gnu.org; 21 Nov 2021 06:34:37 +0000 Original-Received: from localhost ([127.0.0.1]:44003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mogQv-0006Cq-99 for submit@debbugs.gnu.org; Sun, 21 Nov 2021 01:34:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mogQt-0006Cc-3M for 51995@debbugs.gnu.org; Sun, 21 Nov 2021 01:34:35 -0500 Original-Received: from [2001:470:142:3::e] (port=43014 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mogQn-0007tp-Nk; Sun, 21 Nov 2021 01:34:29 -0500 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=0HQJ1iEcd5LDx5wo9GxWb8fshJYzS9yGaLJXKoQErzA=; b=RyC8fDMiKAl2 NuPvho2/Y4Ci03VXeDaawg1lFWw/ITKmUURuT1/yjYqENGj6VEzybHqvCihatfBvAJhySMvGK0iGE Soe1dkk02dbGtAfE9/gwYXImIFMGlmAKOy+GRwRUnJKMcvvphu0XboV8spc7g//byBO86dsigItCU WOKPy4h29GxWuOifsacLbn7n6IKSoDuerH5vLv2KSKw3bLypj+JV4DlK9g43+Jr1vDpdOjqbv07MH xVN4BMXZWUA0+SjqlMNQrtvnZW54qylkY3LVAQrQ0OSyDkwSow0gPR6VS7S5vVqPE8R/rUY34ntWX nGp2RbHstBcllt642RD50Q==; Original-Received: from [87.69.77.57] (port=1088 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 1mogQn-00046p-DJ; Sun, 21 Nov 2021 01:34:29 -0500 In-Reply-To: <84h7c67bdi.fsf@gmail.com> (message from Brahimi Saifullah on Sat, 20 Nov 2021 18:42: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:220530 Archived-At: > Date: Sat, 20 Nov 2021 18:42:01 -0300 > From: Brahimi Saifullah > Cc: 51995@debbugs.gnu.org > > >Since 'window-text-pixel-size' has to deal with arbitrary buffers, it is > >not a good idea to set X-LIMIT or Y-LIMIT to very large values. The > >doc-string of 'window-text-pixel-size' explicitly warns about X-LIMIT > >that > > > > Since calculating the width of long lines can take some time, it's > > always a good idea to make this argument as small as possible; in > > particular, if the buffer contains long lines that shall be truncated > > anyway. > > I saw the warnings, but I'm unsure of their validity. > Here are some benchmarks that I did. Each form was run on a fresh emacs -Q. > Apologies in advance if there is something wrong about them: > > ;;; X-LIMIT nil (window width is the limit) > (benchmark-run 100000 > (save-window-excursion > (with-temp-buffer > (set-window-buffer nil (current-buffer)) > (insert "foo") ^^^ He mean a REALLY long line. Like thousands of characters.