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

Speed up ungit #1508

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open

Speed up ungit #1508

wants to merge 42 commits into from

Conversation

jung-kim
Copy link
Collaborator

@jung-kim jung-kim commented Mar 15, 2022

closes: #1091

  • Speed optimizations at the graph component #1508
    • speed up logic for NodeViewModel.isViewable() logic by using a map instead of doing array.include()
    • throttling ko observable change triggers.
    • removed unnecessary observables.
    • cleaned up how refs are calculated for NodeViewModel. NodeViewModel.ref() is no longer depends on branchesAndLocalTags() and remoteTags().
    • introduced graph.isBigRepo() to disable some of the features
      • branches.js's branch sorting
      • animations
      • hover graphice ovrlay
    • graph.dropareaGraphActions to be computed

Can someone test on their big repos?? It is an improvements but I'm not sure if it is enough of an improvement.


Node count matters less because we incrementally load nodes. But the over all git ref count from show-ref -d command was the biggest reason for the slow down, and indirectly create nodes.

This PR was tested with a repo with 14498 refs and before ungit was unusable but now it usable without any big issues now.

components/graph/git-elements.ts Outdated Show resolved Hide resolved
components/graph/git-elements.ts Outdated Show resolved Hide resolved
@wmertens
Copy link
Contributor

@jung-kim is there anything here that also works on the nodegit branch where node loading and graph layout is different?

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

Successfully merging this pull request may close these issues.

Too slow for big repository.
3 participants