@stuarth said:

Hi
I'm seeing a strange issue with a plugin I built in OS X. The first time it's run after loading SketchUp it will occasionally beachball. Not every time, and there's no special action taken on the first run that would explain its behavior. If it runs successfully the first time, it will run without problem again in the same session. Has anyone seen a similar problem? Where would you start to debug it?

Mac "beachballs" differently regardless of your plugin.
I have a lot of plugins and the time to load is "variable". Sometimes it beachballs for a while, sometimes not.
It's almost like there is a cache somewhere, that is emptied after a while. It seems the first time I load SU in a while it takes more time, then it goes faster. Not as clear cut but kind of.

So the correlation may not be with YOUR plugin.

That said however, careful for loose ends as that will greatly lengthened the beachballing in general (make the short one long and the long one longer)