HCL-TECH-SOFTWARE / domino-jnx

Modern Domino Java API based on JNA access to Domino's C API
https://opensource.hcltechsw.com/domino-jnx/
Apache License 2.0
13 stars 3 forks source link

JNAMessageQueue#take has excessive CPU usage #405

Open jesse-gallagher opened 7 months ago

jesse-gallagher commented 7 months ago

When using JNAMessageQueue#take as part of a server addin, I found that it kept the CPU core it was running on at about 50% usage when idle. To test the alternate case, I made a get(long, TimeUnit) alternative method that uses MQGet instead of MQScan, and that sits at essentially 0% usage at all times. MQScan may be superior for some cases, but it'd make sense to replace methods like #take with MQGet-based implementations.

jesse-gallagher commented 7 months ago

Hmm, not just CPU - looks like it rapidly consumes memory, too, going from an expected baseline of about 200MB to 750MB in less than a minute, and continuing from there.