Long delay when button is clicked

NachitoMax 411 Reputation points
2022-05-31T06:14:04.813+00:00

Hi

A quick question: How can i debug an issue that is occurring when a button is clicked when nothing is being invoked from the click?

In the code behind the button, there is the most simple code of STOP and thats it. Nothing fires or is called but it takes almost 5 seconds from the click to the stop. When i debug it, all i get is the delay then the stop so its really difficult to identify why there is a 4-5 second delay. It only happens on 1 user control.

Thanks

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,397 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,125 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-05-31T11:43:33.607+00:00

    In the debug menu of visual studio 2022 there is an option to start performance profiler. I would run that on your app and press the slow button a bunch of times to see if it shows what is the slow point

    https://learn.microsoft.com/en-us/visualstudio/profiling/beginners-guide-to-performance-profiling?view=vs-2022

    0 comments No comments