This morning I was noticing that text fields could not keep up with my typing 
into them.  But this only occurs during the first minute or so after my app is 
launched, and sampling shows that the main thread is spending most of its time 
in my app delegate's -validateMenuItem:.

I do have a couple items in the main menu which take 0.1 and 0.3 seconds to 
validate because they have dynamic submenus which access the Keychain to look 
for available account information.  Yes, I could redesign and cache this 
information, but before I spend time doing and (and debugging!) that, I thought 
I should try and learn what's going on.

I can understand that when the app launches, for efficiency, Cocoa might want 
to validate all the menu items while the user is sipping coffee and pondering 
what to do.  But these long-validating dynamic menu items (in the Application) 
get validated typically 100 times in the first 53 seconds.  Other items in the 
Application menu only get validated 88 times, and other menus (Edit, Window, 
etc.) get validated less or not at all.  It's inexplicable.

After 53 seconds, and sometimes a few last gasps, it quiets down and then never 
again validates until a menu is clicked.

Is there any way to get Cocoa to relax a little bit with the -validateMenuItem? 
 Or, could someone give a better explanation of what it's trying to do, so I 
could try and help it out?

Thanks,

Jerry_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to