RunOnVirtualThread should avoid using Netty FastThreadLocals #39061
Labels
area/vertx
area/virtual-threads
Issue related to Java's Virtual Threads
kind/bug
Something isn't working
Milestone
During the jackson serialization we currently uses (off-heap) pooled ByteBufs using Netty's pooled allocator, but this could be inefficient, because pooled
ByteBuf
still usesRecycler
s at https://github.com/netty/netty/blob/4ba1c3e7e190bdc9bdd0ece237042f16e843c797/buffer/src/main/java/io/netty/buffer/PooledUnsafeDirectByteBuf.java#L39, which are using https://github.com/netty/netty/blob/4ba1c3e7e190bdc9bdd0ece237042f16e843c797/common/src/main/java/io/netty/util/Recycler.java#L180 which usesFastThreadLocal
s.This is visibile in this flamergraphs as well:
Possible solutions are:
Recycler
- in short, what Vertx usually does BTW)The text was updated successfully, but these errors were encountered: