Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CachedDaemonThreadFactory COMMON_POOL #661

Open
kromar777 opened this issue Mar 13, 2024 · 1 comment
Open

CachedDaemonThreadFactory COMMON_POOL #661

kromar777 opened this issue Mar 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@kromar777
Copy link

There starts and hangs around till app exit a large amount of daemon threads (24 on my CPU), which most of the time do nothing (waiting state). I've never seen noticeble load on these threads actually. I use that pool for my purposes to utilize these threads, isn't it a bad idea?
Maybe it makes sense to give the opportunity to set the pool with desired configuration? Quick search in Idea showed not so many usages - in CachedDataPoints, CachedDaemonThreadFactory and MarchingSquares, but I didn't dig deeper.

@RalphSteinhagen RalphSteinhagen added the enhancement New feature or request label Mar 15, 2024
@RalphSteinhagen
Copy link
Member

Hi @kromar777 thanks for your interest in ChartFX and bringing this up.

We use those daemon threads to offload heavy lifting like point-reduction algorithms and other similar DataSet operations to keep the UI FX responsive. The threads are usually limited to the number of cores because, unless you are IO-bound, having more parallel tasks than CPU cores causes the threads to compete for and slow down the same CPU resource.

I get where you’re coming from with the pool re-use idea; it’s neat. Honestly, we haven’t prioritized customizing it since it hasn’t been a pressing issue for our use cases (yet).

We're all ears for good ideas and open to PRs (Pull Requests). What kind of enhancements do you have in mind?

Thanks for sparking the conversation! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants