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

Optimize WildcardToRegex for file search #3963

Conversation

david-poindexter
Copy link
Contributor

Summary

This PR optimizes WildcardToRegex() to remove unnecessary start/end wildcard characters per comments on #3962. Thanks to @bdukes for the RegEx tip!

Also, since Replace(oldValue, newValue) just returns the current instance unchanged if the oldValue is not found, I thought we could further optimize by removing the check for * or ? in the search term.

@david-poindexter david-poindexter self-assigned this Aug 6, 2020
Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

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

LGTM - and my bad on merging ;)

@david-poindexter
Copy link
Contributor Author

LGTM - and my bad on merging ;)

Ah, no worries at all - more little green dots! 😆 👍

Copy link
Contributor

@bdukes bdukes left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@david-poindexter david-poindexter added this to the Future: Minor milestone Aug 6, 2020
@david-poindexter david-poindexter merged commit d09e73f into dnnsoftware:feature/resource-manager Aug 6, 2020
@david-poindexter david-poindexter deleted the wildcard-search-regex branch August 6, 2020 19:05
@valadas valadas modified the milestones: Future: Minor, 9.8.0 Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants