COM Object performance in different Threads



Hi,

I am writing an application in C# (VS.NET 2002) that runs performance intensive analyses on data sets. In order to keep the UI responsive I have created a seperate thread to do the analysis.

I am using my own DLLS to load the data sets from files and run the analyses. But I have run into a bit of a problem. If I load the data set in the main thread and then run the analysis in the seperate thread the analysis takes about 20 times longer than usual. In addition when I try to display the results in the gui they take forever to display. So it seems that accessing COM objects from different threads than they were created in is really slow. Is there any way around this?

One solution for me would be to create a thread that handled all of the com objects, however this would be a lot of work and I was wondering if there was a simple solution.

Thanks,

-Ben Childs
.



Relevant Pages


Loading