Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Semantic fast #7736

Closed
wants to merge 1 commit into from
Closed

Make Semantic fast #7736

wants to merge 1 commit into from

Conversation

tuhdo
Copy link
Contributor

@tuhdo tuhdo commented Nov 15, 2016

Limit the parsing scope to file, local and project. The choices are listed in semanticdb-find-default-throttle variable.

Limit the parsing scope to file, local and project. The choices are
listed in semanticdb-find-default-throttle variable.
@syl20bnr syl20bnr self-assigned this Nov 21, 2016
@syl20bnr
Copy link
Owner

Thank you ! 👍
Cherry-picked into develop branch, you can safely delete your branch.

@syl20bnr syl20bnr closed this Dec 10, 2016
@syl20bnr syl20bnr removed the Merged label Dec 10, 2016
@braham-snyder
Copy link
Contributor

braham-snyder commented Jul 6, 2017

This alone didn't quite work for me, due to a mode-local default for emacs-lisp-mode in my /usr/local/Cellar/emacs-plus/25.2/share/emacs/25.2/lisp/cedet/semantic/db-el.el.gz that kept resetting my semanticdb-find-default-throttle to include omniscience:

(defvar-mode-local emacs-lisp-mode semanticdb-find-default-throttle
  '(project omniscience)
  "Search project files, then search this omniscience database.
It is not necessary to do system or recursive searching because of
the omniscience database.")

This resets the mode-local version to the global, for what it's worth:

(use-package semantic
  :config
  (setq-mode-local emacs-lisp-mode
                   semanticdb-find-default-throttle
                   (default-value 'semanticdb-find-default-throttle)))

which might or might not result in some missing semantic functionality, but I was really just looking for stickyfunc-mode, which this appears to suffice for.

Lastly, just for those curious, I found that snippet in db-el.el.gz from the semantic directory (find-variable semanticdb-find-default-throttle to find the directory) then spacemacs/search-ag with input -z semanticdb-find-default-throttle (if you happen to .[git]ignore .gz files, you'll also need -u). Note also that -- as of writing -- rg does not suffice here: it cannot search compressed files.

delaanthonio added a commit to delaanthonio/spacemacs that referenced this pull request Aug 3, 2017
Resolve syl20bnr#1907.

Emacs 25 sets semanticdb-find-default-throttle as a mode-local variable in
emacs-lisp-mode and includes the omniscient throttle which slows down indexing.
Let's override the mode-local variable so it doesn't include the omniscient
throttle.

See syl20bnr#7736 for additional context.
delaanthonio added a commit to delaanthonio/spacemacs that referenced this pull request Aug 4, 2017
Resolve syl20bnr#1907.

Emacs 25 sets semanticdb-find-default-throttle as a mode-local variable in
emacs-lisp-mode and includes the omniscient throttle which slows down indexing.
Let's override the mode-local variable so it doesn't include the omniscient
throttle.

See syl20bnr#7736 for additional context.
@quicknir
Copy link
Contributor

Can this be re-opened, and @braham-snyder 's suggested change be merged into spacemacs proper somehow? Right now, it's still the case that by default in a vanilla spacemacs setup with only semantic added, performance in emacs-lisp mode is simply terrible. Surely this isn't ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants