tuhdo / semantic-refactor

Semantic Refactor is a refactoring tool based on Semantic parser framework
267 stars 25 forks source link

slow dwon the spacemacs #26

Closed zyfyy closed 7 years ago

zyfyy commented 8 years ago

I turn off the semantic layer, then every thing goes smoothly. But when I jump over a big source file many times using gtags, the spacemacs just slow down and very hard to use, every command just wait for a moment to execute.

So I just thought it would 'slow down spacemacs when jumped over a big source file many times'.

Any Suggest ? :-)

tuhdo commented 8 years ago

Sorry for the long delay. The reason it is slow because Semantic triggers the parsing on your source tree, thus block Emacs. This is known issue from Semantic. Maybe if your project is not too large, you can have a cup of morning coffee, and come back like nothing have happened.

aborn commented 8 years ago

It makes emacs25 slow and blocked.....

tuhdo commented 8 years ago

It makes emacs25 slow and blocked.....

Yes, that's how semantic works. I tried to limit the parsing scope to a file, but sometimes it goes on and parse the whole project whenever it finds included files. I will try to fix this, but in many cases the whole project parsing is not triggered.

aborn commented 8 years ago

Emacs blocked especially when editing elisp file.

tuhdo commented 7 years ago

@aborn I found a solution. That is, limit Semantic to parse at file scope only, so it will never hang Emacs as file is fast enough to parse instantly (mostly):

(setq semanticdb-find-default-throttle '(file))