You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@niik do we have to worry about O(n) calculations here to calculate ahead/behind? would the app stall if there are >100 branches open?
Yes, you're right that this can't be done in one operation, we need to shell out for each branch. Doing so is fairly quick though and I think as long as we do it on-demand as items are shown as opposed to running it for every branch regardless of whether it's visible in the list there shouldn't be any problem. We'll probably need to be careful so that we don't spin up as many git processes as there are visible branches in one go though, some task management is probably necessary.
We already calculate ahead/behind for all local branches (that has an upstream) after each background fetch in order to perform the background fast-forward.
🤔So we have been using the date in the master list dropdown as a way to indicate which branches were most recently updated and/or worked on. The number of commits behind master is not really the same thing as, recency. Might be helpful to have both at some point.
Activity
[-]Filter Branch to Compare[/-][+] Ahead/Behind Branch Commit Counts[/+]nerdneha commentedon Feb 13, 2018
@niik do we have to worry about O(n) calculations here to calculate ahead/behind? would the app stall if there are >100 branches open?
niik commentedon Feb 13, 2018
Yes, you're right that this can't be done in one operation, we need to shell out for each branch. Doing so is fairly quick though and I think as long as we do it on-demand as items are shown as opposed to running it for every branch regardless of whether it's visible in the list there shouldn't be any problem. We'll probably need to be careful so that we don't spin up as many git processes as there are visible branches in one go though, some task management is probably necessary.
We already calculate ahead/behind for all local branches (that has an upstream) after each background fetch in order to perform the background fast-forward.
j-f1 commentedon Feb 13, 2018
You could also cache the numbers in memory and only update them when a commit or fetch happens.
jeremyzilar commentedon Feb 14, 2018
🤔So we have been using the date in the master list dropdown as a way to indicate which branches were most recently updated and/or worked on. The number of commits behind master is not really the same thing as, recency. Might be helpful to have both at some point.
[-] Ahead/Behind Branch Commit Counts[/-][+][RBB] Ahead/Behind Branch Commit Counts[/+]