There's something odd going on inside the ASP.NET designer of visual studio 2005. When you first open the designer it normally starts in markup mode, all is fine. But as soon as I move over to the Graphical designer surface it starts eating up a lot of memory and it takes 5 minutes just to build the object tree in memory and display it.
I tried reproducing it by closing and restarting VS2005, open my solution again and edit a different file. The second file I tried was a pretty simple one, it was based on a masterpage and no custom base control. There were only four controls on it, so it should be pretty easy for the designer. As I expected, the designer opened pretty fast. But when I tried the same thing with a similar page, VS2005 was slow again and even hung on the operation of switching between markup and design mode.Again, after restarting visual studio all was fine again.
It seems that something goes haywire when you open a second file, because I tried the troubling operation again with two complex aspx files and the behaviour was exactly the same. The only solution I found so far is to skip the design mode and do all the page layout in markup, this makes it a bit harder to build a page, but in the end it's more rewarding as it's all a bit cleaner then it would otherwise be if I used the designer.
Personally I think it's time to give Microsoft a headsup on this problem and hope it works better in Visual Studio Orcas.
— UPDATE —
Rolf mailed me today that the problem I'm experiencing here has to do with way the designer surface was build. It's slow because it has to recompile the page after every change and this can be quite a time consuming process I noticed. He also told me that this problem is fixed in Visual Studio Orcas. So I grabbed Orcas and opened the site in it and indeed it works faster there.
But why the designer only gets slow after having opened a second page is a complete mystery.