Home > Net >  VB.NET application running quickly before they are slow
VB.NET application running quickly before they are slow

Time:04-13

Teachers, I use VB.NET 2010 programming, the program's main function is to control the external hardware test dozens of electricity parameters, a normal test need 3 seconds, program contains 10 to a form, it is mainly used for display and processing a variety of data,

Now I run into a tricky problem, teachers guide,

Details of the problem description is as follows:

Just after 1.0 if the computer is turned on or reset immediately to run the program, the program test time is normal, the test about 3 seconds at a time, continuous testing about an hour works, each test time is 3 seconds,
After about an hour, the program test time suddenly slow function normal (program), each test time to about 6 seconds after the test has been slow, until reboot,

2.0 if the computer is turned on or reset, let the computer idle for more than an hour, and then run the program, then start test is slow, each test time is 6 seconds,

3.0 test is slow, as long as open the master lu software, program test immediately faster (3 seconds), as long as the master lu software has been opened, each test are fast (3 seconds), but once closed the master lu software, testing immediately slow (6 seconds),

I am a novice, help teachers give directions, thank!

CodePudding user response:

Open the task manager to see test CPU utilization in master lu have what change before and after the switch, maybe the computer started out as a high-performance heat later opened into the low performance as master of lu has become high-performance, using a desktop or this ah,

CodePudding user response:

reference 1st floor m0_45149783 response:
open the task manager to see test CPU utilization in master lu didn't have what change before and after the switch, maybe the computer started out as a high-performance heat later opened into the low performance as master of lu has become high-performance, using a desktop or this ah,

Thank you for your reply, I saw, in each case (test fast, slow, slow test when the master is opening or closing), CPU utilization, basic are all the same, is about 25%, the peak of about 80%

CodePudding user response:

Thank you for your reply, I saw, in each case (test fast, slow, slow test master lu is opening or closing), CPU utilization, basic is showed about 25% CPU, peak CPU by about 80%,
In addition, when test slow, in fact, the computer is very normal, run other software applications quickly,
I am using a desktop, Windows 7 operating system,

CodePudding user response:

In addition to monitoring CPU, monitor the memory and hard disk read and write, the two will significantly influence the loading of the program

CodePudding user response:

I saw, in each case (test fast, slow, slow test master lu is opening or closing), the size of the various memory and hard disk read/write speed is basically the same, in addition, our program at runtime without hard disk for how to operate,

CodePudding user response:

But I estimate the phenomenon and the associated memory, last for only 15 minutes before the program runs fast and later in the program with all the necessary place obj=nothing and GC. The Collect (), and add the following two lines instruction:

System. Diagnostics. Process=System. Diagnostics. Process. GetCurrentProcess
MyProcess. PriorityClass=System. Diagnostics. ProcessPriorityClass. RealTime

Program is then quickly run extended to an hour,
  • Related