drewdeponte / git-ps-rs

Official git-ps Rust implementation - the future of git-ps
https://git-ps.sh
MIT License
78 stars 8 forks source link

`gps ls` slow on a repo with a lot of commits #300

Closed Talor-A closed 3 months ago

Talor-A commented 3 months ago

hey, anecdotally i have noticed that gps ls is slower than i remember, I'm not sure if it's a regression in v7 or if it's always been an issue. anyways, i have a repo with a lot of commits (~40k) and a lot of upstream branches (~4.5k), and gps ls takes a longer time to finish than i'd expect.

https://github.com/uptech/git-ps-rs/assets/11509865/da64e134-2255-4743-8ac6-b24702e73870

here's a demo, you can see it has to think for a bit before it displays any output. it's near instant on other repos on my computer.

let me know if more info is needed, I understand this is a bit of a vague report

drewdeponte commented 3 months ago

@Talor-A it is likely not due tot he number of commits. But more due to the number of local branches you.

In v7 it now computes the state from the Git tree. It does this by going through each of the local branches, finding its common ancestor with stack, and processing the commits to understand the patches in that branch, etc.

We have an existing issue for this, https://github.com/uptech/git-ps-rs/issues/275

Therefore, I am going to close this issue and we can continue conversation in that issue.