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

Responsive UI updates handling of slow status updates in large mono repos #162417

Closed
digitarald opened this issue Sep 30, 2022 · 3 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality git GIT issues perf scm General SCM compound issues
Milestone

Comments

@digitarald
Copy link
Contributor

digitarald commented Sep 30, 2022

This is a pain point from various teams that work on large monorepos, funneled through their infrastructure team. They also offered to dogfood any solutions that we could come up with. Many of the devs use other code editors but depend on VS Code's git UI as their preferred git GUI.

The example flow that where the effect is the most frustrating is staging files. Clicking the + causes the UI to think for seconds while the user waits; and only later the file appears.

Main cause of this is of course slow Git CLI, especially on macOS.

I am proposing that VS Code could try to handle slow Git environments more gracefully. To start with experimental settings help users that are blocked by this. It should warn user are aware of the risk that updates in git outside are potentially not captured in the UI state.

Optimistic UI updates for quick operations

Experimental setting that tries to make optimistic UI updates for the most common UI actions.

As a first testing area Stage and Discard (aka git add and remove) are prime examples. They are frequent interactions that should feel snappy, and are most affected by slow git status updates. They run a quick command but then batch a statue update to get a refreshed UI state (as all SCM state right now depends on git status as single source of truth).

Low risk, as git status will still run. High impact on VS Code feeling snappier.

Improve progress

Improved progress on long-running actions. Avoid repeated clicks and confusion when actions don't give enough feedback on slow-running operations.

Related: #62751

Backlog

Scope status update to sub-folder

Experimental setting to scope git status to a folder. In local test that improved performance 10x, but milage will vary.

  • Setting: Alternatively the setting could ask for a workspace folder to limit git to.
  • Current workspace: Limited status checks to files inside the current workspace folder.
  • From task context: For staging files it could scope to just the file or the folder.

High risk and complexity.


Anything else, ideas, tweaks, experiments to try?

@digitarald digitarald added git GIT issues perf scm General SCM compound issues labels Sep 30, 2022
@lszomoru
Copy link
Member

//cc @joaomoreno

@shayded-exe
Copy link

Would love optimistic UI updates!

Staging multiple files is painful right now. I have to pause between each click or risk the list moving under my mouse as I click.

@digitarald
Copy link
Contributor Author

Closing for now. Fyi @lszomoru, afaik your work has touched on all the ideas in this issue. We can re-open when we have more concrete items for slow mono repos.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues perf scm General SCM compound issues
Projects
None yet
Development

No branches or pull requests

4 participants