I've got a very odd problem: I've compiled some Matlab code into an assembly. I instantiate the class with the following C# line:
MatPhiLib temp = new MatPhiLib(); // This line takes 40 seconds to execute.
The very first time this line is called, it always takes exactly 40 seconds to execute. Subsequent calls are instantaneous. Something has changed, because it didn't take this long when I last looked at the code 4 months ago.
Can an expert recommend a way to get some visibility to see whats going on here?
UPDATE:
Noticed that UltraEdit (my editor) also takes precisely 40 seconds to start up the first time as well. I think that there is some link there, as this never used to happen either.
UPDATE:
Found the problem: it was my new NetGear Stora NAS causing the problem with obscene network timeouts. When I unplugged it, everything started to work like greased lightning.
May the fleas of a thousand camels infest the armpits of the donkey-brained guy responsible for that epic engineering design fail.
My guess is that the library will be attempting to make a network call of some sort and 40 seconds is the timeout on this call. You should be able to use the information you learn from the above steps to track down the problem in the library.