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

perf(blame): general improvements #878

Merged
merged 4 commits into from
Sep 22, 2023
Merged

perf(blame): general improvements #878

merged 4 commits into from
Sep 22, 2023

Commits on Sep 22, 2023

  1. Configuration menu
    Copy the full SHA
    e34c267 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e47d59 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d07f96e View commit details
    Browse the repository at this point in the history
  4. perf(blame): run blame for entire file instead of per line

    Previously current_line_blame would run a git-blame process per line
    (via the `-L` flag) in an attempt to be more efficient. However after
    some investigation it seems that running git-blame for the entire file
    rarely exceeds 2x the time it takes to run for a single line, even for
    large files.
    
    This change alters current_line_blame to run git-blame for the entire
    file after each buffer edit and caches that in memory. This makes the
    first git-blame after an edit ~2x slower, but makes any cursor movements
    after that instant.
    
    A follow-up to this would be for current_line_blame to track buffer
    updates to avoid the cache needing to be invalidated on every edit.
    lewis6991 committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    8558382 View commit details
    Browse the repository at this point in the history