pangu-spacing icon indicating copy to clipboard operation
pangu-spacing copied to clipboard

Performance Issue

Open coldnew opened this issue 6 years ago • 5 comments

see: https://emacs-china.org/t/topic/4043 https://emacs-china.org/t/topic/3816

coldnew avatar Oct 17 '17 02:10 coldnew

Hello cloldnew, When enabling global-pangu-spacing-mode', I cannot open large files. The emacs process will be stuck in pangu-spacing-check-overlay'. Is there any way to avoid this?

AmanYang avatar Jan 09 '18 02:01 AmanYang

@AmanYang Can you tell me how large the file you open with ?

I think the problem is due to when open file, pangu-spacing-mode will search from (point-min) to (point-max), which as known as the buffer size (file size).

To solve this issue, I should limit pangu-spacing-mode not search full file but just search user's view area instead.

coldnew avatar Jan 09 '18 08:01 coldnew

When the size of file is larger than 1M, can see obviously slow. When larger than 10M, completely frozen.

AmanYang avatar Jan 09 '18 10:01 AmanYang

@AmanYang Could you try #28 to see if it works for you?

yangsheng6810 avatar Mar 30 '19 01:03 yangsheng6810

@yangsheng6810 Yes. It works for me after a tiny change. I got a compile error after applying your path. pangu-spacing.el:218:1:Error: Wrong number of arguments: #[(beg end func regexp) " Found that in pangu-spacing-check-overlay, the 2nd pangu-spacing-search-overlay took 2 arguments instead of 4.

AmanYang avatar Apr 01 '19 01:04 AmanYang