Sanne/hibernate-ogm — comment on commit 20f89ef1d3ef4ddc97ff2973a6acd04bdefd5635
File: hibernate-ogm-core/src/main/java/org/hibernate/ogm/datastore/mapbased/impl/MapPessimisticReadLockingStrategy.java line 45
By Sanne:

unfortunately, yes as I explained in the pull request description. This just doubles the amount of garbage that we generate for each key, and the key generation is at top position as the most frequently generated object. It is quite noticeable, GC activity is less.

I agree fluent APIs are nice for end users, but I guess I've learned that we should avoid them in internal code especially on hot paths.

I hope we can compensate with nicely looking static helpers with good method names: those parameters where mandatory anyway.