jmonkeyengine
jmonkeyengine copied to clipboard
Performance improvements
Performance improvements. From static code analysis. All Java 8 compatible (is this the official code level?).
There are few types of improvements:
- Switching manual array copying to a system call (is this ok on Android??)
- String concatenation / string format to use StringBuilder properly
- Creating/copying collections switched to use bulk operation
- Some early breaks to loops
- Use Files to get Input/OutputStreams. At least on Windows this is proven to give faster stream implementation
- Collection.toArray size thing (https://shipilev.net/blog/2016/arrays-wisdom-ancients/)
This should be all pretty safe stuff. I did not benchmark this separately at all. These are based on static code analysis.
Note that if merged, use SQUASH and merge. I accidentally added some test files in the process. The Squashing will rewrite this so that that oopsie never happened... right? Anyway, nothing dirty, Jaime heads in various formats
re: your description when it says "Arrays.asList size thing" I think you mean "Collection.toArray() size thing"
Curious: what static code analysis was used?
Curious: what static code analysis was used?
I used IntelliJ's.
re: your description when it says "Arrays.asList size thing" I think you mean "Collection.toArray() size thing"
Correct. Fixed to description.
Is this now ok to merge? I believe I did all the requested changes?
I haven't finished looking at all 107 files.