none
PerformanceCounterCategory.ReadCategory gets stuck or takes a long time on some machines RRS feed

  • General discussion

  • I've got a block of code that's been working for years that is now giving problems, but only on one particular laptop computer.

    The problem is that System.Diagnostics.PerformanceCounterCategory.ReadCategory is taking a very long time or is hung (the developer who's experiencing this waited maybe 30 seconds).

    As far as I've ever experienced, this function is a little slow the first time it's called due to late-binding of dependencies, but after that, it's quick.  After all, under the covers it's just reading from the dynamic performance data in the registry, so it shouldn't be slow.

    Any ideas what might cause this function to get stuck or perform badly?  The machine that's experiencing the problems is running Windows 7 Ultimate - which is also what I'm running, and the code runs fine for me.


    -cd Mark the best replies as answers!

    • Changed type Carl DanielModerator Wednesday, September 17, 2014 11:17 PM No real answer - problem went away
    Friday, July 18, 2014 10:22 PM
    Moderator

All replies

  • Hi Carl,

    I am trying to involve someone familiar with this issue to come into this thread. Thank you for your understanding.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, July 21, 2014 5:16 AM
    Moderator
  • Do you experience the slowness when you open the corresponding category in performance monitor? If not, you may capture a dump during the hang and share to me.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Jacky Wu
    Microsoft Online Community Support

    Monday, July 21, 2014 6:35 AM
  • Do you experience the slowness when you open the corresponding category in performance monitor? If not, you may capture a dump during the hang and share to me.


    I'll have the developer who's seeing the hang try examining the counters in perfmon.

    What sort of a dump did you have in mind?


    -cd Mark the best replies as answers!

    Monday, July 21, 2014 6:30 PM
    Moderator
  • full dump, you can capture it by procdump with -ma as parameter.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Jacky Wu
    Microsoft Online Community Support

    Saturday, August 30, 2014 1:18 PM
  • I'll have the developer who's seeing the hang try examining the counters in perfmon.

    What sort of a dump did you have in mind?



    Problem "went away", no identifiable change was made.  Presumably something was just unhappy on that dev's laptop on that particular day.

    -cd Mark the best replies as answers!

    Wednesday, September 17, 2014 11:17 PM
    Moderator
  • Have you installed some windows update during the days? Maybe that has solved something wrong.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Jacky Wu
    Microsoft Online Community Support

    Tuesday, October 28, 2014 3:01 AM