abo-abo / ace-window

Quickly switch windows in Emacs
970 stars 86 forks source link

Performance issue when a large file is displaying #191

Open failable opened 4 years ago

failable commented 4 years ago

When a window is displaying a regular JSON file (4.5M, 130K lines), ace-window before very slow. Here's the profiling result:

``` - command-execute 5978 98% - call-interactively 5978 98% - funcall-interactively 5978 98% - ace-window 5752 94% - apply 5752 94% - # 5750 94% - ace-select-window 5750 94% - aw-select 5750 94% - mapcar 5720 94% - # 5720 94% aw-offset 5702 93% - avy-read 30 0% - read-key 16 0% - read-key-sequence-vector 9 0% - redisplay_internal (C function) 1 0% - eval 1 0% - cond 1 0% abbreviate-file-name 1 0% aw--lead-overlay 14 0% - nav-flash-blink-cursor 2 0% - nav-flash-show 2 0% beginning-of-visual-line 2 0% - counsel-M-x 226 3% - ivy-read 171 2% - read-from-minibuffer 61 1% - ivy--queue-exhibit 20 0% - ivy--exhibit 20 0% - ivy--update-minibuffer 16 0% - ivy--format 14 0% - mapcar 13 0% - ivy-rich--counsel-M-x-transformer 13 0% - ivy-rich-format 13 0% - mapconcat 13 0% - # 13 0% - ivy-rich-format-column 13 0% - ivy-rich-counsel-function-docstring 6 0% - documentation 1 0% advice--make-docstring 1 0% counsel-M-x-transformer 5 0% - ivy--wnd-cands-to-str 1 0% - ivy-format-function-line 1 0% ivy--format-function-generic 1 0% - ivy--filter 2 0% - ivy--re-filter 2 0% - cl-remove 2 0% - apply 2 0% cl-delete 1 0% - ivy--insert-minibuffer 4 0% - ivy--resize-minibuffer-to-fit 4 0% - window-resize 2 0% - window--resize-mini-window 2 0% - run-window-configuration-change-hook 2 0% - company-posframe-window-change 2 0% - company-posframe-hide 2 0% - posframe-hide 2 0% posframe--make-frame-invisible 2 0% - frame-windows-min-size 1 0% - window-min-size 1 0% - window--min-size-1 1 0% - window--min-size-1 1 0% - window-size-fixed-p 1 0% window--size-fixed-1 1 0% - timer-event-handler 1 0% - apply 1 0% - auto-revert-buffers 1 0% - apply 1 0% - auto-revert-buffers--buffer-list-filter 1 0% - # 1 0% - auto-revert-handler 1 0% - apply 1 0% - auto-revert-handler@bug21559 1 0% - # 1 0% dired-buffer-stale-p 1 0% - ivy--reset-state 10 0% - ivy--filter 3 0% - ivy--recompute-index 2 0% - cl-position 2 0% - cl--position 2 0% ivy--case-fold-string= 1 0% - ivy--re-filter 1 0% cl-remove 1 0% - ivy-thing-at-point 2 0% - thing-at-point 2 0% - thing-at-point-url-at-point 2 0% - thing-at-point-bounds-of-url-at-point 2 0% - thing-at-point--bounds-of-well-formed-url 2 0% - regexp-opt 2 0% - regexp-opt-group 2 0% mapcar 1 0% - regexp-opt-group 1 0% - regexp-opt-group 1 0% - regexp-opt-group 1 0% - regexp-opt-group 1 0% - regexp-opt-group 1 0% regexp-opt-group 1 0% - all-completions 1 0% # 1 0% - ivy-call 2 0% - counsel-M-x-action 2 0% - command-execute 2 0% - call-interactively 2 0% - funcall-interactively 2 0% - profiler-report 2 0% - profiler-report-cpu 2 0% profiler-cpu-profile 2 0% - counsel--M-x-externs 55 0% - smex-update 12 0% - smex-rebuild-cache 12 0% - sort 8 0% smex-sorting-rules 4 0% - mapatoms 3 0% # 2 0% smex-convert-for-ido 1 0% - smex-detect-new-commands 7 0% - mapatoms 7 0% # 6 0% + timer-event-handler 87 1% + redisplay_internal (C function) 4 0% + ... 0 0% ```