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

small memory improvement : do dot convert all the url to check the prefix #228

Closed
wants to merge 1 commit into from
Closed

Conversation

benbenw
Copy link

@benbenw benbenw commented Sep 8, 2016

prefix

@benbenw benbenw changed the title small memory improvement : do dot convert all the url to check the small memory improvement : do dot convert all the url to check the prefix Sep 8, 2016
@vlsi
Copy link
Collaborator

vlsi commented Sep 8, 2016

Looks good. Just one question: HOW did you find that?

@sebbASF
Copy link
Contributor

sebbASF commented Sep 8, 2016

It may be slightly more efficient to use regionMatches, but it's not nearly so obvious what the code is doing.

However checking log.isDebugEnabled() first is an improvement.

@FSchumacher
Copy link
Contributor

There is StringUtils#startsWithIgnoreCase, that does the same and is clearly named.

asfgit pushed a commit that referenced this pull request Sep 8, 2016
@asfgit asfgit closed this in 5d1c388 Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants