Re: RFR: 8355636: Reuse StringBuilder in printStackTrace [v7]

2025-04-28 Thread Shaojin Wen
On Sat, 26 Apr 2025 22:42:08 GMT, Shaojin Wen wrote: >> In the Throwable::printStackTrace method, StringBuilder is created multiple >> times to build String. By sharing StringBuilder to build String, object >> allocation and copying are reduced. >> >> In the scenario without suppressed and our

Re: RFR: 8355636: Reuse StringBuilder in printStackTrace [v7]

2025-04-28 Thread Per Minborg
On Sat, 26 Apr 2025 22:42:08 GMT, Shaojin Wen wrote: >> In the Throwable::printStackTrace method, StringBuilder is created multiple >> times to build String. By sharing StringBuilder to build String, object >> allocation and copying are reduced. >> >> In the scenario without suppressed and our

Re: RFR: 8355636: Reuse StringBuilder in printStackTrace [v7]

2025-04-26 Thread Shaojin Wen
> In the Throwable::printStackTrace method, StringBuilder is created multiple > times to build String. By sharing StringBuilder to build String, object > allocation and copying are reduced. > > In the scenario without suppressed and ourCause, unused IdentityHashMap is > not created. > > Throug