Reduce allocations when pretty printing JCTree during compilation

Vicente Romero vicente.romero at oracle.com
Wed Feb 22 03:52:53 UTC 2023


Hi Christoph,

What are the performance benefits you get from this patch? My 
understanding is that your patch reduces the memory footprint but it 
seems like there are also performance benefits, I think. The patch looks 
good and won't affect readability although some comments should be added 
to the new `print` version to explain why it is a better fit for 
printing chars,

Thanks,
Vicente

On 2/20/23 13:54, christoph.dreis at freenet.de wrote:
>
> Hi,
>
> I’ve been profiling some build pipelines of some customer projects – 
> including their compilation phase.
>
> And while Lombok is a major contributor in these projects (it’s not an 
> option to drop it unfortunately), there are some optimization 
> opportunities in the JDK itself.
>
> I’ve opened a draft PR where you can find more information: 
> https://github.com/openjdk/jdk/pull/12667
>
> If someone finds the time to take a look, I’d highly appreciate it.
>
> Cheers,
>
> Christoph
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230221/e88d1de8/attachment-0001.htm>


More information about the compiler-dev mailing list