Skip to content

How to improve performance of application on long running CPU intensive task C#,#TPL,#Performance

Notifications You must be signed in to change notification settings

anilmalakar/TPLDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.

TPLDemo

How to improve performance of application on long running CPU intensive task

While improving performance of application on long running CPU intensive task I have seen developer creating many task in code and over-subscribing the thread uses, in context switching... but Is that a good solution? My suggestion is to create number of tasks based on the processor count [my preference is half of cores available], and keep adding new when any one of previous task completed.

  1. I have added code for creating many tasks at once in BadDesignManyTasks class
  2. I have added code for creating limited task and create another as and when previous completed in BadDesignManyTasks class
  3. To see it working go to program.cs follow comment in Program.cs file

About

How to improve performance of application on long running CPU intensive task C#,#TPL,#Performance

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages