Re: [Question] [java client] CPU-intensive code on io threads

2023-03-16 Thread Matteo Merli
Adding that executor will introduce 2 additional context switches which would impact the performance. > will do decompression of the payload on > the netty thread, which is a bad practice in my understanding. I would not categorize this as an anti-pattern: io-threads are there to do io work, and

[Question] [java client] CPU-intensive code on io threads

2023-03-16 Thread Andrey Yegorov
Hi, While looking through the code/thread dumps I noticed that decompression of compressed payload happens on pulsar-client-io threads Specifically: https://github.com/apache/pulsar/blob/80c5791b87482bee3392308ecef45f455f8de885/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.ja