[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51995: 29.0.50; `string-pixel-width' depends on the current window w
From: |
Eli Zaretskii |
Subject: |
bug#51995: 29.0.50; `string-pixel-width' depends on the current window width |
Date: |
Sun, 21 Nov 2021 08:34:34 +0200 |
> Date: Sat, 20 Nov 2021 18:42:01 -0300
> From: Brahimi Saifullah <brahimi.saifullah@gmail.com>
> 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.
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Eli Zaretskii, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, martin rudalics, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/21
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/21