atom-notes icon indicating copy to clipboard operation
atom-notes copied to clipboard

Very slow and laggy editing and file switching

Open aswolf opened this issue 6 years ago • 4 comments

I really love this package, but unfortunately, it has become unusable for me. I have a small collection of notes (45 markdown files). Whenever active, atom-notes makes editing and traversing the tree-view file hierarchy very slow. I have found using 'package-cop' that atom-notes is the offending package and verified that the same slow behavior occurs even if atom-notes is the only activated package. What can be done about this?

aswolf avatar May 08 '18 16:05 aswolf

Does package-cop give you any indication about what atom-notes is doing that is causing the performance issues? Perhaps there's some callbacks that are triggering more often than they need to be triggering or something of that nature. A performance profiling report would be really helpful here. I bet there are existing tools for generating that sort of thing if package-cop doesn't already. I'd be very interested to see what functions run most often and where we're spending most of our processing time.

One thing I want to do but haven't had the time for yet is to offload much of the processing of atom-notes to a separate server process. Then we would use interprocess communication to pass requests for data and responses back and forth between Atom and the atom-notes server process. The server process would do things like indexing and searching, which should hopefully have the effect of making Atom more responsive because it wouldn't have to waste valuable renderer process cycles on doing that kind of background processing.

lexicalunit avatar May 08 '18 16:05 lexicalunit

I have about 240 files indexed by atom-notes currently and I do notice some lag whenever first starting up because it's spending time indexing all of that. But I hadn't noticed the issues when navigating the tree-view myself. That's very interesting and definitely a bug that we should try and fix.

lexicalunit avatar May 08 '18 16:05 lexicalunit

Unfortunately, package-cop does not give any information like that and a quick look for profiler packages does not turn up anything. I would be happy to give you this output if you could point me to a package or native atom command that could produce it. Thanks!

As for the lag, it is unworkable on my machine I think. Switching tabs can induce multi-second delays, which also occur while simply navigating around the file. So unfortunately, I cannot use atom-notes right now, but I will happily switch it back on to help squash this bug.

aswolf avatar May 09 '18 12:05 aswolf

So there's actually a profiler built into the dev tools for Chromium that we can utilize to profile Atom as it's running.

screen shot 2018-05-11 at 10 54 18 am

I may try disabling almost all my plugins except atom-notes and then just clicking around the editor for a bit to see if I can capture any performance issues.

lexicalunit avatar May 11 '18 17:05 lexicalunit