How many threads should I use in my Java program?

前端 未结 7 1290
日久生厌
日久生厌 2020-12-09 18:03

I recently inherited a small Java program that takes information from a large database, does some processing and produces a detailed image regarding the information. The ori

7条回答
  •  粉色の甜心
    2020-12-09 18:47

    After seeing your edit, it's quite possible that one thread per CPU is as good as it gets. Your application seems quite parallelizable. If you have extra hardware you can use GridGain to grid-enable your app and have it run on multiple machines. That's probably about the only thing, beyond buying faster / more cores, that will speed it up.

提交回复
热议问题