Akka: Feature request:Make Envelope mutable and pooled?

Created on 2 Dec 2018  路  4Comments  路  Source: akka/akka

I think the Envelope is nearly a totally internal thing and could be pooled and recyclable, which will help reduce the system's gc pressure, it does help.

https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/Recycler.java

0 - new

Most helpful comment

@lukehutch thanks for the link, this would be a big change to the fundamental, so I will first try with some experiment with jmh benchmark so does gc when I have time :)

All 4 comments

Here's a direct link to the ClassGraph recycler... feel free to copy/paste the code if you want (I haven't made this into a separate library yet...)

https://github.com/classgraph/classgraph/tree/master/src/main/java/nonapi/io/github/classgraph/recycler

@lukehutch thanks for the link, this would be a big change to the fundamental, so I will first try with some experiment with jmh benchmark so does gc when I have time :)

Good idea to benchmark first :-) The performance hotspots are often not where you think they are!

Was this page helpful?
0 / 5 - 0 ratings