diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-26 10:22:24 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-26 10:22:24 +0800 |
commit | 974a7e541cc28613cbeed9e0195d945d614d97f4 (patch) | |
tree | 1c8fc7dc5370936a7c119b9e1467edbb1dfc4aab /lisp/emacs-lisp/debug-early.el | |
parent | c7e4c1a5fa3ecbcb29cba6f01016808f1a524eaf (diff) | |
download | emacs-974a7e541cc28613cbeed9e0195d945d614d97f4.tar.gz emacs-974a7e541cc28613cbeed9e0195d945d614d97f4.tar.bz2 emacs-974a7e541cc28613cbeed9e0195d945d614d97f4.zip |
Make X error checking more asynchronous
This makes some operations (such as x-get-atom-name and
x-change-window-property) up to 2600x faster by avoiding calls
to XSync when setting up an error handler, and when checking for
or uncatching errors if all requests were already processed.
* src/xterm.c (X_COMPARE_SERIALS): New macro.
(struct x_error_message_stack): Add new field `first_request'.
(x_find_error_handler): New function.
(x_error_catcher): New parameter `stack'. Use it instead.
(x_catch_errors_with_handler): Keep a record of the next
protocol request serial inside the stack entry.
(x_uncatch_errors, x_check_errors, x_had_errors_p, x_clear_errors)
(x_error_handler): Avoid XSync if all requests were processed by
the X server and look for the error handler matching the display
and request serial when processing errors.
Diffstat (limited to 'lisp/emacs-lisp/debug-early.el')
0 files changed, 0 insertions, 0 deletions