patches: fix O(position) performance via UAZoomEnabled caching

Root cause (per Opus analysis): UAZoomEnabled() is a synchronous
Mach IPC roundtrip to macOS Accessibility server, called 3x per
redisplay cycle. At 60fps = 180 IPC roundtrips/second blocking the
main thread. Combined with Emacs's inherent O(position) redisplay
cost, this compounded into progressive choppy behavior.

Fix 1: ns_zoom_enabled_p() caches UAZoomEnabled() for 1 second.
Fix 2: ns_zoom_track_completion() rate-limited to 2 Hz.

Also includes BUF_CHARS_MODIFF fix (patch 0009) for VoiceOver cache.
This commit is contained in:
2026-03-01 05:23:59 +01:00
parent cd16d45584
commit 6b3843e0c6
11 changed files with 137 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
From 3e868d0234c858fa20588e664354685ef8b08576 Mon Sep 17 00:00:00 2001
From 314e2a5f406a8eb0e6909be6e07fe7e8ddd1c440 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Sat, 28 Feb 2026 14:46:25 +0100
Subject: [PATCH 08/10] ns: announce overlay completion candidates for
Subject: [PATCH 08/11] ns: announce overlay completion candidates for
VoiceOver
Completion frameworks such as Vertico, Ivy, and Icomplete render