GNU bug report logs -
#79058
30.1; involking signal using emacsclient takes very long time to complete ~2 seconds
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Oh. Okay. I understand that this is probably not the best place to discuss
features but having such a delay configurable would be nice. I have created a
small patch. What email should I send it to?
//bror
> On 20 Jul 2025, at 14.02, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Bror Winther <bbw <at> nobad.coffee>
>> Date: Sun, 20 Jul 2025 04:15:53 +0200
>>
>> After upgrading to 30.1 I have noticed that all my external scripts take
>> very long to finish from time to time. In particular I noticed the line
>> in my window manager script `emacsclient --eval "(evil-window-up 1)`
>> would take a long time to finish if there is no window found. This
>> causes the script to be very slow. I think I have narrowed it down to
>> `signal`.
>>
>> The time it takes to execute a simple signal seems to be very high.
>>
>> time emacsclient --eval "(signal 'user-error (list (apply #'format-message \"%s\" '(test))))"
>> *ERROR*: test
>> emacsclient --eval 0.00s user 0.00s system 0% cpu 2.013 total
>
> This is a feature: the Emacs server waits fore 2 sec after showing an
> error message, to make sure the user has time to see it:
>
> (defun server-return-error (proc err)
> (ignore-errors
> ;; Display the error as a message and give the user time to see
> ;; it, in case the error written by emacsclient to stderr is not
> ;; visible for some reason.
> (server--message-sit-for 2 (error-message-string err))
> (server-send-string
> proc (concat "-error " (server-quote-arg
> (error-message-string err))))
[Message part 2 (text/html, inline)]
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.