Performance issue: editing large files (>~10KB, >2000 lines) caused progressive slowdown regardless of VoiceOver status. Root causes: 1. ns_zoom_find_overlay_candidate_line: called Foverlays_in on the entire visible buffer range on every redisplay when UAZoomEnabled(). In files with many overlays (font-lock, hl-line, show-paren etc.) this was O(overlays) Lisp work per keystroke. 2. postAccessibilityNotificationsForFrame: when ns-accessibility-enabled is non-nil, checked BUF_OVERLAY_MODIFF every redisplay. font-lock bumps this on every redraw, triggering ns_ax_selected_overlay_text (another O(overlays) scan) for non-minibuffer windows. Fix: Both scans now guard with MINI_WINDOW_P check. Overlay completion frameworks (Vertico, Icomplete, Ivy) only display candidates in minibuffer windows --- no completion framework puts selected-face overlays in normal editing buffers. For non-minibuffer windows both functions return immediately with zero Lisp calls. Additionally: ns_zoom_find_child_frame_candidate is skipped when f->child_frame_list is nil (no child frames = no Corfu popup).
4.0 KiB
4.0 KiB