hex13 / atom-lupa

Atom extension which displays outline for JavaScript files
MIT License
41 stars 4 forks source link

performance is too bad #36

Open ghostfarmer opened 8 years ago

ghostfarmer commented 8 years ago

hi, I JUST did a try, find that its basically slowing down my atom response, even I toggled it off. took a look at your code, I know its using react, but not sure what part is causing the poor performance.

hex13 commented 8 years ago

not sure what part is causing the poor performance. analysis is done in different repo and it performs advanced static analysis, so it can take long. But it should be done in separate process to avoid slowing atom (if this is really the case).

And long story short: the analysis was done in separate process, but I made some bad design decisions and then I was unable to put analysis in separate process anymore.

Good news is that I've lately rewritten module for static analysis from scratch, so I will be able to make analysis in separate process.

Bad news is that I've done this only partially, there is still work to do (it's very raw for now).

Good/Bad news is that I'm making some bigger project - namely my own IDE/editor for JavaScript, so I'm focused on that now (it can be good news because after that there will be new editor on JS scene which will have something like Lupa in it, but it can be bad news because my Atom package gets neglected)

But maybe in few weeks I will make a huge rewriting on this Atom package as well.

And If you really cannot stand performance in Lupa, you could use alternatives, e.g. https://atom.io/packages/symbols-tree-view

hex13 commented 7 years ago

I've optimized a little bit.

hex13 commented 7 years ago

I've made another optimization. Previously analyzing was triggered in setInterval (every 1000 miliseconds). This was unecessary and caused e.g. lags when document was scrolled.

Now analyzing is triggered only after document in Atom has changed.