Reputation: 41
Currently I'm writing a VB.NET app and it's getting big, resulting in its become very slow.
Is there any application (or plug in) that can test the performance in seconds? I mean, when I click a button and it displays a product, I want to know exactly how long it is gonna take.
Upvotes: 4
Views: 5998
Reputation: 89755
You can also use old school tracing.
Dim ts = Stopwatch.StartNew
' Your code goes here
' Format and display the TimeSpan value.
Dim elapsedTime As String = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10)
Console.WriteLine( "RunTime " + elapsedTime)
Upvotes: 0
Reputation: 300797
Visual Studio (certain versions) has a built-in code profiler:
There is also EqaTec's free code profiler (works well).
[Note: Big does not necessarily mean slow. Big slowdowns are often caused by code that has a complexity of O(N^2) or greater...]
Upvotes: 6
Reputation: 1416
Built in to visual studio is a profiler. You can find it under Analyze/Launch Performance Wizard.
You can also download a free trial of Ants Profiler (Red-gate.com) or dotTrace (JetBrains.com)
Upvotes: 3