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

Config: Remove converter #11834

Merged
merged 4 commits into from
Oct 30, 2023

Conversation

kiminuo
Copy link
Collaborator

@kiminuo kiminuo commented Oct 29, 2023

Precursor for #11764

Measurements

No big change is expected here. Measured using Release configuration.

PR

153 ms
152 ms
154 ms
152 ms
147 ms

master

150 ms
156 ms
155 ms
153 ms

@@ -14,6 +14,8 @@ namespace WalletWasabi.Daemon;

public class Config
{
public static readonly IDictionary EnvironmentVariables = Environment.GetEnvironmentVariables();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to a static variable to avoid executing it multiple times.

return false;
}

public static T[] GetValues<T>(string key, string[] args, Func<string, T> converter)
public static string[] GetValues(string key, string[] args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Converter was unused.

{
var values = GetValues(key, args, converter);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Calling GetValues does not make too much sense because we just use first value we find.

@kiminuo kiminuo marked this pull request as ready for review October 29, 2023 13:59
@kiminuo kiminuo changed the title Config: Minor improvements Config: Remove converter Oct 29, 2023
Copy link
Collaborator

@Szpoti Szpoti left a comment

Choose a reason for hiding this comment

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

tACK

@kiminuo kiminuo merged commit d531ff4 into WalletWasabi:master Oct 30, 2023
7 checks passed
@kiminuo kiminuo deleted the feature/2023-10-29-Config-perf branch October 30, 2023 12:37
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