Skip to content

staging: optimize the number of info() calls#6281

Merged
efiop merged 2 commits intomasterfrom
optimize-redundant-info-calls
Jul 7, 2021
Merged

staging: optimize the number of info() calls#6281
efiop merged 2 commits intomasterfrom
optimize-redundant-info-calls

Conversation

@isidentical
Copy link
Contributor

@isidentical isidentical commented Jul 5, 2021

We do 2 .exists() and .isdir() call for the same path in the same context, so we can reduce them into a single info() call and retrieve all information we need in one go. If the file is not there, it will raise an FileNotExistsError too.

@isidentical isidentical requested a review from efiop July 5, 2021 09:55
@isidentical isidentical requested a review from a team as a code owner July 5, 2021 09:55
@isidentical isidentical force-pushed the optimize-redundant-info-calls branch from 8f30960 to 2872611 Compare July 5, 2021 11:10
@isidentical isidentical requested a review from efiop July 7, 2021 19:52
@efiop efiop merged commit 87b49fd into master Jul 7, 2021
@efiop efiop deleted the optimize-redundant-info-calls branch July 7, 2021 19:53
@efiop efiop added the optimize Optimizes DVC label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimize Optimizes DVC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments