In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to solve the problem of .NET application efficiency, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something from this article.
.net applications have always been selling with fast development and powerful IDE, and of course I, who don't have a high IQ and expect rapid development, will choose it. The first time to try to use. Net to do the entire machine tool control program, the platform is not too powerful, Caiyang 2.4 CPU and 512 memory, basically enough to run. After more than two months of development, the underlying functions have been basically improved, and the console program does not see the problem of efficiency. I am relieved to use WINDOWS FORMS to complete the rest of the interface.
When a certain degree is achieved, the efficiency problem gradually becomes apparent, and the GUI interface is very slow and maddening. After trying a lot of methods and optimization, we finally have to go to the bed for actual debugging. After a busy day yesterday, I finally found the problem. I will not elaborate on the process. The most fundamental way to solve the problem is to find the root cause of the disease.
Sometimes we may think that the GUI performance of WINDOWS FORMS is not very good, and the interface refresh is always slow, and sometimes much slower than MFC programs. Of course, there are some problems with the GUI library, which we can only optimize from the other side. But in fact, Microsoft has done well enough, and much depends on how we use it.
There are two ways to find the root cause of the disease: one is the random evidence and random medicine used by quacks, which is occasionally effective; the other is the scientific method of western medicine, using data to speak. After being a quack for a while, I finally want to try to solve the problem with tools.
Resharper is probably used by a lot of people, and JetBrains also has a product for performance analysis-dotTRACE. This tool is much easier to use than the performance testing tool that comes with VS. After a detailed test with this tool, I immediately found the root of the disease. Of course, it is necessary to choose the correct test mode, because I am multi-threaded, so I need to use the thread-specific test mode to measure the time of function calls in the thread.
It really hit the nail on the head, found the problem and solved it immediately.
Finally, let's sum up:
Don't blindly look for problems, find tools to speak with data.
The .NET GUI library has some minor performance problems (such as DataGridView, but it is still very fast when it is used), but it is not enough to affect the normal work, and most of the time it is caused by its own misuse.
After reading the above, do you have any further understanding of how to solve the problem of .NET application efficiency? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.