On Tue, 9 Aug 2022 20:26:43 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Mon, 8 Aug 2022 18:55:39 GMT, Max Mielchen wrote:
>> David Schlosnagle has updated the pull request with a new target base due to
>> a merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 11 additional
>> commi
On Tue, 9 Aug 2022 18:35:05 GMT, Mandy Chung wrote:
>> David Schlosnagle has updated the pull request with a new target base due to
>> a merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 11 additional
>> commit
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Sat, 6 Aug 2022 14:55:17 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Sat, 6 Aug 2022 14:55:17 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Sat, 6 Aug 2022 14:55:17 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Tue, 2 Aug 2022 15:38:05 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Tue, 2 Aug 2022 14:13:25 GMT, Roger Riggs wrote:
>> David Schlosnagle has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Inline max Integer.stringSize
>
> Are there existing tests that validate the formatted results?
> If so, add this b
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Tue, 2 Aug 2022 13:58:52 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Tue, 2 Aug 2022 13:52:30 GMT, Quan Anh Mai wrote:
>> David Schlosnagle has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Estimate length
>
> src/java.base/share/classes/java/lang/StackTraceElement.java line 365:
>
>> 363:
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Tue, 2 Aug 2022 13:34:26 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Tue, 2 Aug 2022 05:29:38 GMT, Quan Anh Mai wrote:
>> David Schlosnagle has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Address comments
>
> Since constructing a `String` from a `StringBuilder` requires an array copy
> anyway, you don
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Mon, 1 Aug 2022 17:35:05 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Mon, 1 Aug 2022 17:35:05 GMT, David Schlosnagle wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a n
On Mon, 1 Aug 2022 17:24:48 GMT, David Schlosnagle wrote:
>> src/java.base/share/classes/java/lang/StackTraceElement.java line 366:
>>
>>> 364: if (!dropClassLoaderName() && classLoaderName != null &&
>>> !classLoaderName.isEmpty()) {
>>> 365: prefixClassLoader = true;
>>> 3
On Wed, 27 Jul 2022 22:56:39 GMT, David Schlosnagle wrote:
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a numb
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a number of JDK code paths
> including `Throwable#printStackTrace(
On Thu, 28 Jul 2022 00:48:32 GMT, Carter Kozak wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a numbe
On Thu, 28 Jul 2022 01:23:53 GMT, David Schlosnagle wrote:
>> src/java.base/share/classes/java/lang/StackTraceElement.java line 374:
>>
>>> 372: * @throws IOException If an I/O error occurs
>>> 373: */
>>> 374: private void appendTo(Appendable dest) throws IOException {
>>
>> Perh
On Thu, 28 Jul 2022 13:45:53 GMT, David Schlosnagle wrote:
>> I think in this case it's better to specify `StringBuilder` instead of
>> `Appendable`, because the method is private and you'd hardly ever pass there
>> anything different from SB.
>
> If we go with the proposal above to make `appen
On Thu, 28 Jul 2022 14:38:50 GMT, Carter Kozak wrote:
>> `Throwable.printStackTrace()` will use `StringBuilder` as well, won't it?
>
> I don't think so, it appends directly do something like System.err (default)
> or another PrintStream/PrintWriter without fully holding the string value on
> he
On Mon, 1 Aug 2022 17:08:12 GMT, Сергей Цыпанов wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a numb
On Thu, 28 Jul 2022 14:33:39 GMT, Сергей Цыпанов wrote:
>> If we go with the proposal above to make `appendTo(Appendable)` package
>> visible so that `Throwable.printStackTrace()` can benefit from this as well,
>> we would need to keep this as Appendable, otherwise I agree we should just
>> in
On Thu, 28 Jul 2022 13:12:57 GMT, Сергей Цыпанов wrote:
>> `Appendable` does not currently have an `append(int)` method on the
>> interface, though `StringBuilder` does. We could add it to `Appendable` via
>> default method if so desired:
>>
>>
>> default Appendable append(int value) {
>>
On Wed, 27 Jul 2022 22:56:39 GMT, David Schlosnagle wrote:
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a numb
On Thu, 28 Jul 2022 13:07:01 GMT, David Schlosnagle wrote:
>> src/java.base/share/classes/java/lang/StackTraceElement.java line 400:
>>
>>> 398: dest.append(fileName)
>>> 399: .append(':')
>>> 400: .append(Integer.toString(lineNumbe
On Wed, 27 Jul 2022 22:56:39 GMT, David Schlosnagle wrote:
> I would like to contribute an optimized version of
> `StackTraceElement#toString()` that uses a single StringBuilder throughout
> creation to avoid intermediate `String` allocations.
> `StackTraceElement#toString()` is used in a numb
On Mon, 1 Aug 2022 16:20:25 GMT, David Schlosnagle wrote:
>> If the objective of this patch is to optimise
>> `StackTraceElement::toString()`, then I would suggest the most efficient
>> method of calculating the length and encoding of the result, filling the
>> backing buffer then using the pa
On Thu, 28 Jul 2022 15:42:15 GMT, Quan Anh Mai wrote:
>> I would like to contribute an optimized version of
>> `StackTraceElement#toString()` that uses a single StringBuilder throughout
>> creation to avoid intermediate `String` allocations.
>> `StackTraceElement#toString()` is used in a numbe
I would like to contribute an optimized version of
`StackTraceElement#toString()` that uses a single StringBuilder throughout
creation to avoid intermediate `String` allocations.
`StackTraceElement#toString()` is used in a number of JDK code paths including
`Throwable#printStackTrace()`, as wel
36 matches
Mail list logo