Skip to content

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

Closed
benbenw wants to merge 1 commit intoapache: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 intoapache:trunkfrom
benbenw:small-perf

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.

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