What do your mean "interrupting"? Invocation is the method to delegate some processing to a UI thread. All the delegate instances and their call parameters are queued (be the calls to
Invoke
or
BeginInvoke
) to be executed on the UI thread only. In this way, you add some workload to a UI thread, and this is
absolutely unavoidable, as soon as you want to use some controls added to the UI, update the view, etc.
All you can do is to minimize the total volume of work by preprocessing of everything not directly related to methods or properties of the UI control in your UI-thread.
In you non-UI thread you can save some performance: don't call
InvokeRequired
— it will always return true of called not from the IO thread.
Accumulating of several calls in one "bigger"
Invoke
or
BeginInvoke
would not help, because they queue the data and delegate instances anyway. Just the opposite, it can degrade performance due to unwanted overhead.
For more detail in invocation, please see my past answers:
Control.Invoke() vs. Control.BeginInvoke()[
^],
Problem with Treeview Scanner And MD5[
^].
See also my short Tips & Tricks article for invocation to non-UI thread:
Simple Blocking Queue for Thread Communication and Inter-thread Invocation[
^].
—SA