gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.97k stars 1.32k forks source link

File History Sidebar Keeps Refreshing And Losing Scroll Position #2773

Open BenjaminWKI opened 1 year ago

BenjaminWKI commented 1 year ago

Description

I'm using the File History side bar to go through the git history of a specific file in my repository. This file is really old with thousands of commits and requires me to scroll down several times to the entries I'm looking through and step through each commit of the file to review the changes done to it.

During this process, the File History keeps refreshing for absolutely no reason at all and it re-renders the side bar with the scroll at the top, losing my scroll position in the history. Sometimes it refreshes with each click on any entry in the File Entry, making the File History completely and utterly unusable as I have to click on a commit entry to find out if that's the one that I was last at, only to have Git Lens just throw me back at the beginning for each click.

How do you stop this refreshing or have the File History side bar highlight which history entry that is being viewed?

GitLens Version

14.0.1

VS Code Version

Version: 1.79.2 (system setup) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:57:04.379Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045

Git Version

git version 2.39.0.windows.2

Logs, Screenshots, Screen Captures, etc

No response

jkelroy commented 1 year ago

Hello @BenjaminWKI, I am wondering if you have a setting enabled contributing to this. Can you please share your Settings.json (command/ctrl + P > Preferences: Open User Settings (JSON))? Also, can you share a video of the behavior?

BenjaminWKI commented 1 year ago

After running more tests, I'm under the impression that this bug's rate of occurance greatly depends on the available system memory; It seems to occur regularly when I have other applications running in the background and using up most of my memory.

In this GIF animation of the problem attached below, I have applications taking up 75% of my 16GB memory. If I cull the background programs and get the memory usage to around 50%, the bug occurs less than half the time.

Code_2023-07-06_14-10-00

Attached below is my settings: { "git.ignoreMissingGitWarning": true, "editor.trimAutoWhitespace": true, "files.associations": { "*.asp": "vbscript" }, "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.formatOnType": true, "editor.mouseWheelZoom": true, "gitlens.advanced.messages": { "suppressCreatePullRequestPrompt": true, "suppressShowKeyBindingsNotice": true }, "files.maxMemoryForLargeFilesMB": 24000, "breadcrumbs.enabled": true, "terminal.integrated.rightClickBehavior": "default", "html.format.wrapLineLength": 0, "xmlTools.removeCommentsOnMinify": true, "editor.maxTokenizationLineLength": 2000000, "gitlens.views.fileHistory.location": "gitlens", "gitlens.views.lineHistory.location": "gitlens", "gitlens.views.compare.location": "gitlens", "gitlens.views.search.location": "gitlens", "[vbscript]": {}, "workbench.activityBar.visible": true, "gitlens.views.repositories.location": "scm", "git.confirmSync": false, "editor.accessibilitySupport": "off", "gitlens.views.repositories.enabled": true, "workbench.sideBar.location": "left", "projectManager.git.baseFolders": [ "C:\\Users\\Benjamin Wong\\Source\\Azure DevOps" ], "gitlens.views.remotes.branches.layout": "list", "mssql.connections": [ { "server": "{{put-server-name-here}}", "database": "{{put-database-name-here}}", "user": "{{put-username-here}}", "password": "" } ], "git.allowForcePush": true, "gitlens.views.repositories.branches.layout": "list", "gitlens.views.commits.files.layout": "list", "diffEditor.maxComputationTime": 0, "window.commandCenter": true, "window.menuBarVisibility": "compact", "extensions.ignoreRecommendations": true, "extensions.autoUpdate": "onlyEnabledExtensions", "[javascript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, "git.openRepositoryInParentFolders": "never", "files.autoSave": "afterDelay", "window.zoomLevel": -2, "codestream.serverUrl": "https://codestream-us1.service.newrelic.com", "editor.minimap.showSlider": "always", "diffEditor.renderSideBySide": false, "editor.minimap.enabled": false }

eamodio commented 1 year ago

@BenjaminWKI Could the file have been renamed in the at some point and so commits prior to the rename won't refresh the view, but after do?

Can you please enable debug logging by running the GitLens: Enable Debug Logging command from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens & GitLens (Git) channels in the Output pane.

Once enabled, please reproduce the issue, and attach the logs from the GitLens and GitLens (Git) channels.

Thank you!

jkelroy commented 1 year ago

@eamodio here are the steps I took to repro:

https://github.com/gitkraken/vscode-gitlens/assets/27739784/e67e3094-7243-4df8-a55d-8180e07a1a79

gitlens.txt gitlens-git.txt


Version: 1.80.1 (user setup) Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771 Date: 2023-07-12T17:22:56.973Z Electron: 22.3.14 ElectronBuildId: 21893604 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT arm64 10.0.22621

Git: version 2.40.0.windows.1 GitLens: 14.1.1

jacob-lcs commented 2 months ago

GitLens v15.2.3 also has this issue. @eamodio What can i do to solve this? 🙏

Version: 1.92.1 Commit: eaa41d57266683296de7d118f574d0c2652e1fc4 Date: 2024-08-07T20:16:39.455Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0