The "require" is a heavy job especially for non-existing package, followings are some benchmark when require non-existing package 100 times in different enviroment. You will find that the "require" consume too much time for non-existing package when load-path has many element.
Such problem make holo-layer lags very much if the user don't has package blink-search or sort-tab installed since both command "holo-layer-is-normal-window-p" and "holo-layer-monitor-configuration-change" call "requires" and they are both called in post-command-hook
"require" benchmark in personal current environment
The "require" is a heavy job especially for non-existing package, followings are some benchmark when require non-existing package 100 times in different enviroment. You will find that the "require" consume too much time for non-existing package when load-path has many element.
Such problem make holo-layer lags very much if the user don't has package blink-search or sort-tab installed since both command "holo-layer-is-normal-window-p" and "holo-layer-monitor-configuration-change" call "requires" and they are both called in post-command-hook
+begin_src emacs-lisp
(benchmark-run 100 (require 'non-exist-package nil t))
+end_src
+RESULTS:
: (2.9320095829999997 1 0.40929535400000816)
+begin_src emacs-lisp
(benchmark-run 100 (require 'evil nil t))
+end_src
+RESULTS:
: (0.001063338 0 0.0)
+begin_src bash
emacs -Q --batch --eval \ "(progn (require 'dired) (prin1 (benchmark-run 100 (require 'dired nil t))))"
+end_src
+RESULTS:
: (0.001935583 0 0.0)
+begin_src bash
emacs -Q --batch --eval \ "(prin1 (benchmark-run 100 (require 'non-exist-package nil t)))"
+end_src
+RESULTS:
: (0.08311429199999999 1 0.005793993000000001)
+begin_src bash
emacs -Q --batch --eval "$(cat << EOF (let ((default-directory "~/.emacs.d.default/.local/straight/build-30.0.50")) (normal-top-level-add-subdirs-to-load-path) (prin1 (benchmark-run 100 (require 'non-exist-package nil t))) ) EOF )"
+end_src
+RESULTS:
: (113.71601326 100 1.45376804)
+begin_src bash
emacs -Q --batch --eval "$(cat << EOF (let ((default-directory "~/.emacs.d.default/.local/straight/build-30.0.50")) (normal-top-level-add-subdirs-to-load-path) (prin1 (benchmark-run 100 (require 'dired nil t))) ) EOF )"
+end_src
+RESULTS:
: (0.007873583 0 0.0)