Comments (12)
How large are you opening the files? It's better provide some examples for troubleshooting.
Of course, you can try this snippet to check if it works.
(add-hook 'find-file-hook
(lambda ()
(when (too-long-file-p)
;; or (font-lock-mode -1)
(fundamental-mode 1)
)))
from .emacs.d.
Meet the most at around 30M, occasionally at around 100M, and also at 1G or above
from .emacs.d.
Did you try the snippet above?
from .emacs.d.
Thank you , plus the above configuration to open a normal txt file, the speed has some changes, but if there is a 5000 lines or more python file, open the search operation still need to load a long time. For example, if you open a py file for the first time, and it contains a python dict formatted with 5000 lines, it will take a long time to load when searching.
from .emacs.d.
Since I don't have the examples for troubleshooting, I am wondering what about with emacs -Q
. And it's better get profiling report to move forward. See profiling
from .emacs.d.
search:
176,526,018 68% + command-execute
70,353,849 27% + timer-event-handler
10,633,431 4% + redisplay_internal (C function)
211,344 0% winner-save-old-configurations
198,762 0% + substitute-command-keys
32,040 0% + sideline--post-command
17,840 0% + gcmh-register-idle-gc
16,830 0% + help-command-error-confusable-suggestions
12,328 0% + lsp-ui-sideline
12,160 0% + tooltip-show-help
10,258 0% + #<compiled -0x190659bcf02f3ea0>
8,288 0% + lsp--post-command
4,352 0% + corfu--auto-post-command
1,632 0% + #<compiled 0x181154b46c2ea924>
192 0% mouse--click-1-maybe-follows-link
184 0% global-hl-line-highlight
0 0% ...
from .emacs.d.
openfile:
56,517,802 50% + timer-event-handler
35,776,794 31% + redisplay_internal (C function)
14,742,696 13% + command-execute
5,326,711 4% + #<compiled 0x1da2b4d9e51249be>
190,784 0% + winner-save-old-configurations
151,666 0% + substitute-command-keys
45,213 0% + #<compiled -0x190659bcf02f3ea0>
37,788 0% + symbol-overlay-post-command
35,268 0% + sideline--post-command
32,406 0% xselect-convert-to-string
26,224 0% + gcmh-register-idle-gc
9,424 0% + lsp--post-command
8,368 0% + lsp-ui-sideline
8,184 0% + #<compiled 0x17d1feaf6e00be7d>
6,256 0% + jit-lock--antiblink-post-command
6,144 0% + corfu--auto-post-command
5,200 0% + eldoc-schedule-timer
5,181 0% + #<compiled 0x187939225f7e66fb>
4,144 0% + clear-transient-map
3,280 0% + tooltip-show-help
1,584 0% global-hl-line-highlight
1,056 0% + clear-transient-map
816 0% + gui-set-selection
320 0% mouse--click-1-maybe-follows-link
48 0% + deactivate-mark
0 0% ...
from .emacs.d.
Expand timer-event-handler
and check the CPU percentages., please.
from .emacs.d.
search.zip
openfile.zip
I have exported the report for searching and exporting files to the attachment above. Thank you !
from .emacs.d.
`
data = {}
for i in range(6000):
key = f'key_{i}'
value = f'value_{i}'
data[key] = value
with open('large_dict_file.py', 'w') as file:
file.write('large_dict = ')
file.write(repr(data))
file.write('\n')
`
Alternatively, you can use the above code to generate a similar file and open it in python major mode, which may cause stuttering when opening and searching. Thank you !
from .emacs.d.
Thanks for the information! According to the reports, the bottleneck is highlight-indent-guides
.
Please
- Update to the latest version.
- Try to disable highlight-indent-guides-mode`.
- Evaluate
(too-long-file-p)
. - Check the value of
prog-mode-hook
.
from .emacs.d.
The latest version has some effects. Thank you !
from .emacs.d.
Related Issues (20)
- [Bug] Blank screen on fresh install HOT 7
- [Bug] Find File is very slow HOT 7
- Is dotfiles a dependency of Centaur Emacs?
- Installation process isn't working [Bug] HOT 1
- Installation error [Question] HOT 7
- [Bug] nerd-icons-octicon: Unable to find icon with name ‘key’ in icon set ‘octicon’
- [Bug] Table text cannot be centered, vertical bars cannot be aligned HOT 1
- Nerd-icon.el url: raw.githubusercontent [Bug] HOT 4
- [Bug] the window size is always maximized at startup HOT 2
- [Feature Request] Maybe 'init-package' should before 'init-custom' HOT 1
- [Feature Request] How could I config PYIM input method with pyim-wbdict? HOT 1
- [Feature Request] How to install package from git, when package is not in melpa HOT 3
- Buffer visualization HOT 2
- 请问怎么关闭透明背景 , 或者调整透明度? HOT 2
- 每次打开文件都提示: Warning (emacs): ‘:events-buffer-scrollback-size’ deprecated. Use ‘events-buffer-config’. HOT 8
- 使用默认主题时, corfu 补全弹出框中选中的高亮行与其它行几乎无法区分 HOT 1
- 怎么打开 flymake 的实时错误检查? HOT 2
- [Bug] my-dashboard-insert-copyright: Symbol’s value as variable is void: dashboard-set-footer
- [Bug] failed to install HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from .emacs.d.