Bloated Designer.cs file


Author
Message
Aaron Young
Aaron Young
StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)StrataFrame User (435 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi guys,



This is a general observation rather than a specific SF problem.



I noticed by total accident that the designer.cs file for a relatively large form contained references to comboboxes that were no-longer displayed on the form and which I thought had long since been deleted. The form had 15 SF comboboxes but the designer file created, initialized and databound 27 comboboxes - the other 12 were never shown or used and were totally hidden. During early form development I have no doubt I added and removed the other 12 comboboxes but their references remained within the designer file for some reason. Since removing the 12 "ghost" comboboxes from the designer file, the form loads faster - dramatically so in the form designer which always stalled for 20 seconds on loading after clicking on the first field. The problem isn't only restricted to the combobox as there are numerous labels as well.



It appears Visual Studio is not very good at cleaning up the designer file. If you have a reasonably complex form which has undergone editing over a period of time, it would be worth checking the designer file if you are experiencing slow loading and stalling in the form designer.



I am off to try and find a utility which will scan the designer file and report on un-used objects. Smile



Aaron



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search