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

Config / README request: sane default for g:gutentags_file_list_command? #316

Open
rlue opened this issue Dec 20, 2021 · 0 comments
Open

Comments

@rlue
Copy link

rlue commented Dec 20, 2021

Describe the bug

I was experiencing severe CPU load resulting from the following conditions:

  • working on a JavaScript web app (i.e., with a node_modules directory)
  • using vim-gutentags
  • with default configuration (g:gutentags_file_list_command is undefined)

Eventually, I determined that ctags was generating tags for all files in the project directory, including all the third-party JavaScript dependencies/libraries stored in node_modules/ (which are very typically a lot). The resulting tags file was over 166k lines long; after applying a sane default, that number fell to 29(!).

This CPU load made my system (Thinkpad T460 with 4 CPU cores) virtually unusable while working on the project: simple tasks like spawning a new tmux window/pane (and loading .bashrc) would freeze up for ten or fifteen seconds every time I saved a file.

Setup

  • Debian 12 (bookworm) / vim 8.2
  • exuberant-ctags 5.9~svn20110310
  • no g:gutentags_cache_dir

Proposed solution

I found the following suggested config value on #136:

let g:gutentags_file_list_command = {
      \   'markers': {
      \     '.git': 'git ls-files',
      \   },
      \ }

I'd like to propose that this value be made the default, or at least that it be suggested in the README, to save other people the time of chasing down this performance issue for the very common use case of doing JavaScript development.

Alternately, is there any way gutentags could, say, ignore all files in .gitignore by default? Or is there a reason that would be a bad idea?

StanczakDominik added a commit to StanczakDominik/dotfiles that referenced this issue Mar 30, 2022
MasseR added a commit to MasseR/nix-conf-nvim that referenced this issue Sep 21, 2022
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

No branches or pull requests

1 participant