如何在调试模式下修复运行缓慢的程序



我有 Windows 窗体程序包含许多绑定控件,当我通过调试运行它时,它在加载数据时很慢,添加新数据更慢,而没有调试它运行得更快

我尝试重建和清理解决方案,还删除了bin和obj文件夹,删除了Visual studio用户选项(suo),并删除了所有断点并检查了调试选项

我发现复选框的绑定控件使用选中时非常慢前任。 oType.DataBindings.Add(New Windows.Forms.Binding("checked", BindingSource1, field, True))

使用时

 oType.DataBindings.Add(New Windows.Forms.Binding("checkstate", BindingSource1, field, True))

它立即运行

最新更新