close
Skip to content

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

Closed
benbenw wants to merge 1 commit into
apache:trunkfrom
benbenw:small-perf
Closed

small memory improvement : do dot convert all the url to check the prefix#228
benbenw wants to merge 1 commit into
apache:trunkfrom
benbenw:small-perf

Conversation

@benbenw

@benbenw benbenw commented Sep 8, 2016

Copy link
Copy Markdown

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

vlsi commented Sep 8, 2016

Copy link
Copy Markdown
Collaborator

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

@sebbASF

sebbASF commented Sep 8, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

4 participants