VB.NET / Win forms / VS 2008
I'm working on some software and I'm very happy with the UI design so far.. very structured and easy to read.. but when I resize the window, it's extremely "laggy". When I watch task manager, CPU spikes to 25% (utilizing 100% of a core) when resizing the window (0% when not being resized). It's redrawing the window at something like 4 frames per second, if that.
It's a fairly complex UI, but nothing crazy by any means. I don't feel like it should be running like this.
My layout heirarchy looks something like this:
<FORM>
<TABCONTROL> (first tab example, subsequent tabs follow the same control hierarchy)
<SPLITCONTAINER>
<PANEL 1>
<DATAGRIDVIEW />
</PANEL 1>
<PANEL 2>
<TABCONTROL>
<TABCONTROL>
<TABCONTROL>
Lots of data fields in these tabs
</TABCONTROL>
</TABCONTROL>
</TABCONTROL>
</PANEL 2>
</SPLITCONTAINER>
</TABCONTROL>
</FORM>
Everything is docked to its parent. It's all very fluid. So the splitters are docked (fill mode) in the main tabs, the tabcontrols are docked (fill mode) within other tabcontrols, etc.
I think it's just putting a large load on the system trying to recalculate positions of controls when the window is resized.
Any suggestions as to what I could do about this short of completely redesigning the software?