ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.77k stars 197 forks source link

Select all & indent 1400 word doc = 5min high-cpu beachball. #373

Open mhairston opened 8 years ago

mhairston commented 8 years ago

Selected a whole document -- not a large one at all, just 1400 words, and hit cmd-] to indent (while the preview window was open), and the application became unresponsive for 5+ minutes, with the CPU at 100% & spinning rainbow cursor.

Without the preview window open, it's better, but still takes about 30 seconds. But then indenting back again took the full 5+ minutes again.

version 2.2b (111), Mac OS X El Capitan 10.11.6 1150 notes total, stored as individual text files.

elasticthreads commented 8 years ago

Please update to latest version (2.2 (121) ) by going here: http://brettterpstra.com/2016/09/27/nvalt-2-dot-2-take-2-dot-2-one-more-time-with-feeling/

And let us know if you still have this problem. Thanks.

wenglingmei commented 4 years ago

I had a note about 16,000 words, which would trigger beachball. I inspect the call stacks and find the main thread is busy on pasteboard generation (CFPasteboardBeginGeneration). Due to the symbols are stripped, I could only figure out the pasteboard is invoked by offset 0x78c40 in TEXT section. I wonder if the pasteboard invocation is necessary or any optimize can be applied?