Your code runs a very tight loop, and in its center it calls ReportProgress ().
This means that your MessageQueue is loaded with requests for execution updates.
If you create some delay (Thread.Sleep (100)) in the Bgw stream, you will see that responsiveness improves.
A more practical solution is to move the report into an external loop. In your case:
for (int i = 1; i <= 30; i++)
{
int percent = (i * 100) / 30;
_worker.ReportProgress(percent);
for(int j = 0; ....)
....
}
1 , : "if ((counter% 100) == 0)...`
- , 10 100 Reportprogress.