smallrye / smallrye-common

Common utilities for SmallRye
Apache License 2.0
21 stars 24 forks source link

Save StringConcat bytecode generation for one-time operation #317

Open franz1981 opened 3 months ago

franz1981 commented 3 months ago

This has popup as a bytecode generation operation which can both save memory and CPU time at startup, see

image

It both save the lambda generation and, most importantly, a useless string concatenation.

dmlloyd commented 3 months ago

Why not just eliminate the string concatenation and keep the lambda? Keeping the lambda means one less class to load from disk.

franz1981 commented 3 months ago

@dmlloyd I have no strong opinion on this, so I can do it like that as well

dmlloyd commented 3 months ago

:+1: it's probably better to keep the fix down to the thing being fixed when possible.