AW: Reduce allocations when pretty printing JCTree during compilation
christoph.dreis at freenet.de
christoph.dreis at freenet.de
Wed Feb 22 12:16:55 UTC 2023
Hi Vicente,
thanks for your time. I‘ve posted a comment in the PR (https://github.com/openjdk/jdk/pull/12667#issuecomment-1439917000) with some more screenshots that are somewhat messy in the mailing list and often get lost for me.
But TL;DR. No (noticeable) time gain. CPU frames (of Pretty.visitSelect) went down from ~2.2% to ~1.4%, though. Allocations from 7.09% down to 4.13%.
Should I already go ahead and make use of the new `print(char)` method in other places as well?
Cheers,
Christoph
Am 22.02.23, 04:53 schrieb "Vicente Romero" <vicente.romero at oracle.com>:
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<mailto: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/20230222/d078bf3f/attachment-0001.htm>
More information about the compiler-dev
mailing list