|
Slow Performance Counter
I am writting a program using .Net. I am using the PerformanceCounter class and as previous experience with this class has also shown, the retrieval of values is prohibitively slow. (Atleast in the context which I am using it in) In this particular scenario I am getting the "Process">"IO Data Bytes/sec" for each process and using the RawValue, not the computed NextValue(). Is there another way I can retrieve this information (is it beneficial to use advapi.dll and bypass .net?). Less importantly (or perhaps more) why are the performance classes so slow anyway? I looked around on the net and found issues about slow constructors and over network parallel use problems, but not much on the slow performance of retrieving values otherwise. It looks like the underlying RegQueryValueEx function is rather time consuming. Funny that the word Performance is in the name of the class, isn't it?
|