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

Incremental update of huge tags db -- parse the VCS diff #5

Open
amerlyq opened this issue Feb 12, 2020 · 1 comment
Open

Incremental update of huge tags db -- parse the VCS diff #5

amerlyq opened this issue Feb 12, 2020 · 1 comment

Comments

@amerlyq
Copy link

amerlyq commented Feb 12, 2020

Idea: parse changeset removed/added lines and modify tags database in-place accordingly by removing tags from - lines and adding tags from + lines. In theory it may significantly reduce time to update tagfile and will allow to automatically run ctags from pre-commit and post-checkout hooks without user workflow disruption.

Suggested command:

git diff-index -U0 $(git rev-list -1 --before=$(date +%s -r tags) master) | ctags --incremental ...

The question: is it feasible?

  • Won't underlying filesystem ruin theoretical performance due to necessity of reading whole file and dumping it whole back after modifications?
  • Are tagfile parser and formatter fast enough to parse large tags file and dump them back after modifications, or they will be as slow, as recursively parsing directly from sources?
  • Do we need some novel logfile-like append-only DB format to reduce the performance hit, CoW cloning and SSD wear?
@masatake
Copy link
Member

You may be interested in the discssion we had at universal-ctags/ctags#423 .

@masatake masatake transferred this issue from universal-ctags/ctags Mar 31, 2020
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

2 participants