winforms icon indicating copy to clipboard operation
winforms copied to clipboard

HDPI Performance and Rendering Issues

Open alanhoman opened this issue 4 years ago • 2 comments

  • .NET Core Version: 6.0.0-preview.7.21323.1

When moving the application from the primary monitor at 100% to a secondary monitor at 150%, then opening a Child MDI form by selecting File -> New, there are performance and rendering issues:

  1. Opening a new Child form on the primary monitor takes 416 ms. When moved to the secondary at 150% and selecting File -> New, the Child form takes 4,850 ms to open. This particular form is opened potentially hundreds of times during a day for our users and this delay is significant.
  2. The fonts for the GroupBoxes and ListViews are large and appear to become larger on the secondary monitor.

Primary Monitor (100%): LargeFormOpenOnPrimary Secondary Monitor (150%) LargeFormOpenOnSecondary Here is the repo: LargeFormCore.zip

alanhoman avatar Jul 01 '21 22:07 alanhoman

Verified this on .NET 8.0 latest build: 8.0.100-alpha.1.22565.7, performance issue is still repro, but rendering issue doesn't repro, the fonts for the GroupBoxes and ListViews scale well on the secondary monitor.

100% DPI primary monitor: 100%

200% DPI secondary monitor: 200%

Amy-Li03 avatar Nov 21 '22 08:11 Amy-Li03

@dreddy-work this might be related to the lack of a global DPI specific font cache.

JeremyKuhne avatar Aug 16 '23 17:08 JeremyKuhne

@Olina-Zhang can your team check if this is still an issue? I think there might have been improvements to the font cache since it was last tested?

elachlan avatar May 16 '24 23:05 elachlan

@elachlan Verified this on .NET 9.0 latest build: 9.0.100-preview.5.24265.9, Performance issue have improved dramatically. Rendering issue doesn't repro, the fonts for the GroupBoxes and ListViews scale well on the secondary monitor.

100% DPI primary monitor: image 150% DPI secondary monitor: image

Philip-Wang01 avatar May 17 '24 05:05 Philip-Wang01

I'll close this issue for now as both the rendering and performance issues are resolved.

CC: @lonitra

elachlan avatar May 17 '24 05:05 elachlan