2 added 165 characters in body
source | link

The optimization that fulfills your first two bullets is called an Object Pool. It works by

  1. creating a pool of objects when the program starts,
  2. maintaining references to those objects in a list so that they don't get garbage collected,
  3. handing objects to your program from the pool as needed, and
  4. returning objects back to the pool when you're done using them.

You can find an example class that implements an Object Pool using a ConcurrentBag here.

Thread/process priority can easily be set at runtime. The Thread Class has methods and properties that allow you to set priority and processor affinity. The Process Class contains similar facilities.

The optimization that fulfills your first two bullets is called an Object Pool. It works by

  1. creating a pool of objects when the program starts,
  2. maintaining references to those objects in a list so that they don't get garbage collected,
  3. handing objects to your program from the pool as needed, and
  4. returning objects back to the pool when you're done using them.

Thread/process priority can easily be set at runtime. The Thread Class has methods and properties that allow you to set priority and processor affinity. The Process Class contains similar facilities.

The optimization that fulfills your first two bullets is called an Object Pool. It works by

  1. creating a pool of objects when the program starts,
  2. maintaining references to those objects in a list so that they don't get garbage collected,
  3. handing objects to your program from the pool as needed, and
  4. returning objects back to the pool when you're done using them.

You can find an example class that implements an Object Pool using a ConcurrentBag here.

Thread/process priority can easily be set at runtime. The Thread Class has methods and properties that allow you to set priority and processor affinity. The Process Class contains similar facilities.

1
source | link

The optimization that fulfills your first two bullets is called an Object Pool. It works by

  1. creating a pool of objects when the program starts,
  2. maintaining references to those objects in a list so that they don't get garbage collected,
  3. handing objects to your program from the pool as needed, and
  4. returning objects back to the pool when you're done using them.

Thread/process priority can easily be set at runtime. The Thread Class has methods and properties that allow you to set priority and processor affinity. The Process Class contains similar facilities.