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

Improve EnsureDirectoryExists #11751

Conversation

kiminuo
Copy link
Collaborator

@kiminuo kiminuo commented Oct 20, 2023

This should very slightly improve performance because most often than not those directories already exist.

Even if it's almost the same, Directory.CreateDirectory(..) allocates and we don't need the result at all, so using Directory.Exists(..) feels like the correct approach here.

@kiminuo kiminuo marked this pull request as ready for review October 20, 2023 07:51
Copy link
Collaborator

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamPetho adamPetho merged commit 7e510ef into WalletWasabi:master Oct 20, 2023
7 checks passed
@kiminuo kiminuo deleted the feature/2023-10-20-EnsureDirectoryExists branch October 20, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants