Skip to content

Commit

Permalink
Use StringBuilder instead of String concat for startup code
Browse files Browse the repository at this point in the history
Unfortunately the JDK's indyfied String concatenation
has a slight performance penalty at startup, so for
code we know will always be run at startup, let's not
pay that unnecessary price.
With this change we force javac to use the
StringBuilder strategy
  • Loading branch information
geoand committed Jan 17, 2025
1 parent ceaf90d commit ddb26ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@
</annotationProcessorPaths>
<compilerArgs>
<arg>-AsplitOnConfigRootDescription=true</arg>
<!-- As string concatenation has a non-zero impact on startup, let's disable it for this module -->
<arg>-XDstringConcat=inline</arg>
</compilerArgs>
</configuration>
</execution>
Expand Down

0 comments on commit ddb26ac

Please sign in to comment.