asyncer-io / r2dbc-mysql

Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).
https://r2dbc.io
Apache License 2.0
181 stars 18 forks source link

Add LoopResources Configuration Support #232

Closed jchrys closed 4 months ago

jchrys commented 4 months ago

Motivation: Enhances flexibility by allowing custom LoopResources configuration for optimized event loop management.

Modifications: Introduced LoopResources configuration option in MysqlConnectionConfiguration and updated relevant documentation.

Result: Enables performance tuning and flexibility, improving adaptability for various deployment scenarios. Resolves #229

jchrys commented 4 months ago

I think we are okay to LoopResources for Tcp only. since AsynchronousFileChannel is using min 0 max Integer.MAX_VALUE executor by default so each opened will have a dedicated thread.(https://github.com/openjdk/jdk/blob/8765b176f97dbf334836f0aa6acd921d114304a9/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java#L46)