bisq2 icon indicating copy to clipboard operation
bisq2 copied to clipboard

Optimize Scheduler to use less threads

Open HenrikJannsen opened this issue 5 months ago • 2 comments

The Scheduler creates a new ScheduledExecutorService each time it gets created. We should avoid creating new ScheduledExecutorServices each time. Using a pool does not work well as there is only one API with a fixed pool core pool size but it is hard to estimate the right number for that. We can use a cache where idle ScheduledExecutorService instances are retired and reused when a new Scheduler is created.

HenrikJannsen avatar Mar 14 '24 10:03 HenrikJannsen