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

Efficiencies: avoid constructing new Objects, auto boxing, etc. #448

Merged
merged 1 commit into from
Sep 8, 2016

Conversation

hansenmc
Copy link
Contributor

  • Use static methods to produce Numbers, rather than constructors.
  • Avoid auto boxing. If primitives are needed, use Obj.parseXXX()
  • Do not recalculate NodeList.getLength() inside of a loop. It is not
    cached and is re-calculated on every invocation. Set value outside of
    the loop.
  • Avoid constructing new String() objects when not necessary.
  • Use entrySet iterator, rather than Map.get()

…trySet iterators

- Use static methods to produce Numbers, rather than constructors.
- Avoid auto boxing. If primitives are needed, use Obj.parseXXX()
- Do not recalculate NodeList.getLength() inside of a loop. It is not
cached and is re-calculated on every invocation. Set value outside of
the loop.
- Avoid constructing new String() objects when not necessary.
- Use entrySet iterator, rather than Map.get()
@sammefford sammefford merged commit 02d3712 into marklogic:develop 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.

2 participants