Font Panel Sucks the Life Out of Interface Builder

Normally I find Interface Builder to be pretty snappy. From time to time over the past few months, however, I have encountered periods of time where Interface Builder’s responsiveness has slowed to a crawl. What the heck! Could my Nib files be getting too complicated for IB’s scrappy little frame to handle? I doubted it seriously, considering the complexity of other applications whose Nib files I have known and loved.

I finally traced it down to an insidious, parasitic relationship between the standard font panel and Interface Builder.

It seems that when the Font Panel is enabled, Interface Builder is liable to start choking on things like mouse clicks and drags. I have observed repeated delays of up to 2 or 3 seconds, just to click on a UI element in IB! And this is a on Dual 2.0Ghz G5! Pity the poor iMac user! When the Font panel goes away, responsiveness comes back 100%. If you’re just a little bit of a clutter-rat, as I am, then you’re liable to leave your Font Panel open as you forge ahead with your interface design. It never occurred to me that this might be robbing precious minutes from my work day!

This problem can be reproduced easily on Mac OS X 10.4.2 with Xcode 2.1 installed. Follow these steps to reproduce the problem yourself and gape in awe:

Launch Interface Builder, creating a new “Cocoa Application” document.

Observe the quickness with which you can click and change the selection between each of the 4 instance icons:

Press Cmd-T to bring up the Font panel.

Resize the Instances window such that the icons rearrange. For some reason this helps reveal the problem. I don’t know if this is a caching issue or what:

Now try clicking between the icons again. It may take a few rounds through, but you will soon start to observe hideous delays between mouse click and selection change.

Once you’ve observed the slowdown, close the Font panel by again pressing Cmd-T. This should return responsiveness to normal levels

This is a small demonstration of what it’s like to have this kind of delay plague your entire design session. The delay applies to anything clickable, selectable, draggable, etc., in IB. This includes all UI elements in your windows, views, etc.

So if you’ve been plagued by mysterious, dramatic reductions in IB responsiveness. Make sure your Font panel is closed. It may be sucking the life out of IB!

I’d be interested to hear if any readers can or cannot reproduce this on their own machines. For now I’m assuming it’s widespread, and I’ve reported it as Radar 4293149.