-
Enhancement
-
Resolution: Fixed
-
P5
-
9
-
b25
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056779 | emb-9 | Unassigned | P5 | Resolved | Fixed | b25 |
Currently the implementation creates a String instance of the entire CharBuffer before using substring to subset out the selected part.
If the CharBuffer is large then materializing the String only to subset it is wasted effort. For current implementations of String, StringBuilder, StringBuffer (and the prior pre-692524 implementation as well) gettting the interesting part via CharSequence.subSequence() and then calling toString() provides better performance and memory usage.
If the CharBuffer is large then materializing the String only to subset it is wasted effort. For current implementations of String, StringBuilder, StringBuffer (and the prior pre-692524 implementation as well) gettting the interesting part via CharSequence.subSequence() and then calling toString() provides better performance and memory usage.
- backported by
-
JDK-8056779 (bf) Optimize StringCharBuffer.toString(int, int)
-
- Resolved
-