Description
Description
@franz1981 and @Sanne have been investigating performance of Hibernate Reactive, and came to the conclusion that a specific problem has a significant impact on performance: using in one event loop a DB connection that was created by Vert.x for a different event loop.
This would be specifically this code: https://github.com/eclipse-vertx/vert.x/blob/c85bacac22166313d639411ad503eb38f5e2e3cc/vertx-core/src/main/java/io/vertx/core/internal/pool/SimpleConnectionPool.java#L602-L612
This issue tracks work on improving performance of this specific code.
Implementation ideas
One idea that floated around was to wait a bit for a connection to be available in the current context (event loop) before resorting to a connection from another context, thereby favoring use of connections from the same context.
Arguably, this would increase latency, but it would reduce context switching and thus resource utilization, so it could allow more parallel requests for the same resources.