From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Andrea Corallo <acorallo@gnu.org>
Cc: 75357@debbugs.gnu.org, pipcet@protonmail.com
Subject: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size assumption breaks on repeated runs
Date: Mon, 06 Jan 2025 09:24:13 -0500 [thread overview]
Message-ID: <jwvikqsowma.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <yp1r05g5log.fsf@fencepost.gnu.org> (Andrea Corallo's message of "Mon, 06 Jan 2025 04:35:59 -0500")
>> On scratch/elisp-benchmarks, the following emacs -Q invocation:
>>
>> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))'
>>
>> produces a fatal Lisp error, attempting to invoke the debugger in a
>> non-interactive session:
>>
>> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie...
>> Window size: 19 x 80
>> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark")
>> signal(error ("Window size not as stipulated by the benchmark"))
>> error("Window size not as stipulated by the benchmark")
>> elb-scroll-entry()
>
> I'm not sure this is a bug as we want always to run the benchmark from a
> known state, anyway adding Stefan as he's the author of the benchmark.
Sounds like something has changed in Emacs's C code, or maybe it's
something in some system-depend code?
`elb-scroll` cares about the window size because it's a benchmark that
is influenced by (and thus partly measures) the redisplay:
(unless (and noninteractive (not (boundp 'redisplay-skip-initial-frame)))
(defun elb-scroll-entry ()
;; FIXME: This relies on `elb-smie.el' being compiled already which is
;; not necessarily the case if we're only running some of the benchmarks.
(load (expand-file-name "elb-smie" elb-bench-directory) nil 'nomessage)
(setq redisplay-skip-initial-frame nil)
(with-temp-buffer
(rename-buffer (generate-new-buffer-name "elb-scroll"))
(switch-to-buffer (current-buffer))
(insert-file-contents (expand-file-name
"../resources/xmenu.c" elb-bench-directory))
(redisplay 'force) ;; Refresh the window dimensions.
(enlarge-window (- 23 (window-height)))
(enlarge-window (- 80 (window-width)) 'horiz)
(redisplay 'force) ;; Refresh the window dimensions.
(unless (and (equal 23 (window-height))
(equal 80 (window-width)))
(error "Window size %S x %S not as stipulated by the benchmark"
(window-height) (window-width)))
(dotimes (_ 10)
(elb-smie-mode)
(goto-char (point-min))
(condition-case nil
(while t (scroll-up nil) (redisplay 'force))
(end-of-buffer nil))))))
Try and figure out why window size is 19x80 after
(enlarge-window (- 23 (window-height)))
(enlarge-window (- 80 (window-width)) 'horiz)
- Stefan
prev parent reply other threads:[~2025-01-06 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 16:36 bug#75357: [scratch/elisp-benchmarks] elb-scroll window size assumption breaks on repeated runs Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-06 9:35 ` Andrea Corallo
2025-01-06 14:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvikqsowma.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=75357@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=pipcet@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.