WinForms Designer Hangs on a form with a large number of controls as of VS 17.5
See original GitHub issueEnvironment
VS 17.5.1
.NET version
.NET 6
Did this work in a previous version of Visual Studio and/or previous .NET release?
The problem does not exist in VS 17.4
Issue description
When opening a form with 2700+ Telerik controls and simply trying to save the form, VS hangs. The CPU varies but goes to 90%+ and the memory used climbs to use all available (64 GB), The form never saves (tried up to 8 hours). This did not happen under VS 17.4.
Steps to reproduce
create a form with 2700+ Telerik controls and open in the designer then try to save the form
Diagnostics
unable due to the hang.
Issue Analytics
- State:
- Created 6 months ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Winforms designer crashing when loading form with user ...
I have a Winforms form that has 2 user controls. The controls are dynamic, i.e., they use table layout panels quite a bit...
Read more >WinForms Designer Hangs on a form with a large number ...
Windows Forms is a .NET UI framework for building Windows desktop applications. - WinForms Designer Hangs on a form with a large number...
Read more >Visual Studio 2019 .NET Core hangs in forms designer
Anytime I access the forms designer in Visual Studio 2019, the application stops responding until I kill and restart it. This only happens...
Read more >Web Froms - Visual Studio 2022 v17.5.2 hangs when ...
Web Froms - Visual Studio 2022 v17.5.2 hangs when clicking any control ... Open Tools > Options > Web Forms Designer, select the...
Read more >Visual Studio 2022 WinForms designer hang on "Loading ...
Create a new project using the template "Windows Forms App (. ... but with a complex forms setup (many controls/many nested levels of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is it even possible to have a form with 3200 controls? Winforms has a handle per control, you will run into handle starvation and receive OOM errors if you add much more controls. Moving your app to lazy load controls would massively reduce your memory/handle usage.
.net framework had the same issue, I moved to lazy loading because the designer was painfully slow for some of the larger forms with 10+ tabs.
That being said, it would be nice if the designer could handle it. What is the minimum number of controls that causes the issue?
Changed the status of the feedback to under investigation and verified this in a different environment. In VS 17.4.5, opening the MainForm about 90 seconds and then saving the Form after resizing it takes about 30 seconds. In VS 17.5.1, opening the MainForm about 90 seconds and then saving the Form after resizing it, VS is not responding. In VS 17.5.1 + vsix, opening the MainForm about 90 seconds and then saving the Form after resizing it takes about 300 seconds.