-
Notifications
You must be signed in to change notification settings - Fork 29
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
Debounce calls to git branch #3887
Conversation
@@ -41,6 +41,7 @@ export class ExperimentsData extends BaseData<ExpShowOutput> { | |||
} | |||
|
|||
public async update(): Promise<void> { | |||
void this.updateAvailableBranchesToSelect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] FWIW moving this in here means that
vscode-dvc/extension/src/process/manager.ts
Lines 53 to 58 in d92aa52
private shouldDebounce(lastStarted: number | undefined) { | |
return ( | |
lastStarted && | |
getCurrentEpoch() - lastStarted < DEFAULT_DEBOUNCE_WINDOW_MS | |
) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the same thing for what I'm currently working on (cleaning up the table state when changing branches). It makes more sense as well.
d92aa52
to
7a87ce2
Compare
@@ -41,6 +41,7 @@ export class ExperimentsData extends BaseData<ExpShowOutput> { | |||
} | |||
|
|||
public async update(): Promise<void> { | |||
void this.updateAvailableBranchesToSelect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the same thing for what I'm currently working on (cleaning up the table state when changing branches). It makes more sense as well.
7a87ce2
to
1d01044
Compare
1d01044
to
40368b5
Compare
Code Climate has analyzed commit 40368b5 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 94.9% (0.0% change). View more on Code Climate. |
Whilst testing with the output channel open I noticed this:
This PR denounces calls to
git branch --no-merge
by moving them intomanagedUpdate
in theExperimentsData
class. If you can foresee any problems with this approach then PLMK.