M
Mats-Lennart Hansson
Hi,
I'm trying to use threads to have a form showing the progress of a major
validation function. It works fine, but the performance is really poor. What
I do is:
When pressing the validate button, I create a form that is showing progress
info. After that, I'm starting a new thread that does the validation. This
thread communicates with the form by using events and delegates.
When I have the validation in a separate thread, it takes ~30 minutes to do
the validation. However, if I don't use the thread but calls the validation
directly, it takes only 3 minutes! In this case, my progress form will not
work.
Is this a common problem, does anyone know how to increase performance? I'm
using the code below to start a new thread.
System.Threading.Thread thread = new System.Threading.Thread(
new System.Threading.ThreadStart(MajorValidationFunction));
thread.Start();
Thanks!
Mats-Lennart
I'm trying to use threads to have a form showing the progress of a major
validation function. It works fine, but the performance is really poor. What
I do is:
When pressing the validate button, I create a form that is showing progress
info. After that, I'm starting a new thread that does the validation. This
thread communicates with the form by using events and delegates.
When I have the validation in a separate thread, it takes ~30 minutes to do
the validation. However, if I don't use the thread but calls the validation
directly, it takes only 3 minutes! In this case, my progress form will not
work.
Is this a common problem, does anyone know how to increase performance? I'm
using the code below to start a new thread.
System.Threading.Thread thread = new System.Threading.Thread(
new System.Threading.ThreadStart(MajorValidationFunction));
thread.Start();
Thanks!
Mats-Lennart