简体   繁体   中英

How do I test performance of my .NET application and optimize it?

I have been developing an application that runs on a client computer and extracts data from a central SQL Server server.

Before the application was quite fast and running good. As a little data grew in size up to some thousands of records now the program is being too slow on client computers.

How do I check the performance of my .NET application?

I am planning to check the performance of my .net app

Get a profiler. It will tell you where your app is spending a majority of its time so that you can find the bottlenecks. These are the areas to focus on to improve your performance.

I have been developing an application that runs in client computer and extracts data from central SQL Server.

Before the application was quite fast and running good. As few data grew in size upto some thousands of records now the program is being too slow in client computers.

Sounds like a database problem (indexing, select n + 1, select fetches instead of join fetches, etc.). The profiler will tell you if your app is spending too much time waiting for the database to return results. If that is where the bottleneck is, work on that. Work on indexing your tables appropriately, and optimizing your queries (are you pulling back more columns than you need, do you have select n + 1 problem, etc.)

The salient point is this is: don't guess. Don't waste your time optimizing loops that aren't performance bottlenecks, etc. You're are observing performance that is consistent with the database being a bottleneck. Get a tool that will confirm that guess for you. Use that tool to focus your efforts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM