The Weirdly Slow App

I’ve got a weird bug where some of my users have my Mac app slow right down. It even slows down for choosing a static menu. Click the File menu. Wait 2 seconds. Menu drops down.

I’d suspect a memory leak though it’s a bit weird that stuff that is essentially code free, like menu items, are slowing down.

It seems to slow down after being on for some time and clears up on restart of the app.

Any clues? It’s a large app with some declares and MBS plugins but I don’t think those are the cause.

can you profile the code? that will give you a clue where alot of time is being consumed…
and slow menus just may be a symptom, not the problem

Yes. I’ve profiled the code. When it’s doings stuff, it looks fairly busy. But when profiled idle, there’s almost nothing going on. And it’s still slow while idle if you know what I mean.

It’s almost like it’s processing in slow motion. I watched the UI update and then another part of the UI, which is on a timer of 1 millisecond, waited for 3 seconds before it updated.

This happened to me a year or two ago … I had icons on some menu items and was reading the icons from disc in the enablemenuitems code, using a plugin to get the image. (that I no longer use)
Do you have any code in that event that is firing?

Ask the user to reboot the machine, I’m seeing a plethora of graphics issues on Yosemite. I spent a whole trying to figure out why a CALayer based app was running very slowly, even dragging the window around was very slow! I also noticed it in Apple made applications also.

Reboot and everything’s faster (not as fast as it was under Mavericks).