Hiding a shortcut in Windows Form takes 244 ms

I'm trying to figure out if I can find the source of the problem. I am trying to use .NET 4.0 on a compact / compact computer. When starting the application with the addition of StopWatch it takes 244 ms to start a simple line label.visible = false; where only 22 ms is required on my computer. Other parts of the code work 100% perfectly, this is only this area. What could be the reason for this?

Here is the system I'm trying to run the application on. I know his cheap computer, but this is the only application that will work on it. I went through and uninstalled all the default programs installed by Acer, and launched all the Windows updates.

Amazon.com - Acer Aspire Revo AR3700-U3002 Slim and Compact Desktop

Product Features

  • 1.8 GHz Dual Core Intel Atom D525
  • 2 GB of installed DDR3 RAM
  • 250 GB SATA Hard Drive (5400 rpm)
  • Integrated nVIDIA Ion Graphics
  • Windows 7 Home Premium

CPU, memory and motherboard

  • Hardware platform: unknown
  • Processor: 1.8 GHz Intel Atom
  • Number of processors: 1
  • RAM: 2 GB
  • RAM Type: Unknown
  • Memory slots: 2

HDD

  • Size: 250 GB.
  • Type: Unknown
  • Speed: 5400 rpm
+4
source share
2 answers

Actually, this may depend on which platform you are developing too. GDI + Acceleration has been removed in Windows 7 / Vista. Thus, all GDI + operations, even simple ones, such as hiding / showing forms, are much slower.

This is one thing that was not removed in Windows Server 2008, but has since been removed in Windows Server 2008 R2. Therefore, if you use Windows XP or lower, or Windows Server 2008 or lower for your development machine, it can be noticeably faster than a similar Windows 7 or Windows Vista machine.

Regardless of hardware acceleration, video card comparisons may be fine. Embedded graphics cards on low-level machines are rarely compared with embedded graphics cards included in development machines.

Other performance problems are the real lack of RAM (especially if it runs on a 64-bit version), it can cause GDI calls to an incredibly slow hard drive (5400 rpm) if it lacks RAM.

Try to run the same test in WPF? If the speeds are very similar in WPF, this is probably due to a video / hardware acceleration or memory problem, since WPF benefits from full 3D hardware acceleration and uses your video memory mainly for the user interface, not for your RAM.

+2
source

Run the example several times and get more information. Especially often call StopWatch several times in a row to check which resolution it supports.

Jit compilation can be very slow on a slow machine, so run it several times or NGEN code.

Check if the hardware runs at full performance and not at โ€œminimum processor speed", etc. A laptop moved to power saving mode can be very slow.

By embedding a custom drawing, you can see if the draw action or the Event action is all happening.

Also check if you have many running applications, some laptops have a bunch of software pre-installed, which slows down the computer before bypassing.

In short, give us much more information. Debug what part of the operation is slow, and then come back to us.

0
source

Source: https://habr.com/ru/post/1382292/


All Articles