I am working on WPF/C# desktop application.
I have 2 methods (lets call Tasks
). Each task takes 10% of the CPU and whole application takes 10% as well. So,
When I run both tasks in one instance, it divides the CPU utilization (5% for each, so obviously processes get slow)
When I run 2 instances of my application, and run one task on each application. Its all fine. Total utilization is 20% as should be for 2 tasks.
Now the question is: How can I use 20% of CPU utilization in one instance of my application?
I can not add code, because its very complex to make a MCVE of my application.
Complete Scenario:
Its a face recognition application. 1st camera with 30 fps utilizes 10% CPU. When 2nd camera starts, both fps gets down to 15 fps and the total application utilization is still 10% (it doesn't increase but slows down the tasks, as it did with fps).
When I run 2 instances of the application, each with 1 camera. FPS is 30 on both instances and CPU utilization is 20% in total. That's the whole scenario !