Giter VIP home page Giter VIP logo

Comments (12)

seagle0128 avatar seagle0128 commented on May 29, 2024

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.

evalcoding avatar evalcoding commented on May 29, 2024

Meet the most at around 30M, occasionally at around 100M, and also at 1G or above

from .emacs.d.

seagle0128 avatar seagle0128 commented on May 29, 2024

Did you try the snippet above?

from .emacs.d.

evalcoding avatar evalcoding commented on May 29, 2024

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.

seagle0128 avatar seagle0128 commented on May 29, 2024

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.

evalcoding avatar evalcoding commented on May 29, 2024

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.

evalcoding avatar evalcoding commented on May 29, 2024

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.

seagle0128 avatar seagle0128 commented on May 29, 2024

Expand timer-event-handler and check the CPU percentages., please.

from .emacs.d.

evalcoding avatar evalcoding commented on May 29, 2024

search.zip
openfile.zip
I have exported the report for searching and exporting files to the attachment above. Thank you !

from .emacs.d.

evalcoding avatar evalcoding commented on May 29, 2024

`

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.

seagle0128 avatar seagle0128 commented on May 29, 2024

Thanks for the information! According to the reports, the bottleneck is highlight-indent-guides.

Please

  1. Update to the latest version.
  2. Try to disable highlight-indent-guides-mode`.
  3. Evaluate (too-long-file-p).
  4. Check the value of prog-mode-hook.

from .emacs.d.

evalcoding avatar evalcoding commented on May 29, 2024

The latest version has some effects. Thank you !

from .emacs.d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.