Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
- Subject: Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
- From: Mike Engber <email@hidden>
- Date: Wed, 26 Mar 2003 09:00:14 -0800
John Louch said:
Mike Engber said:
First off, you have who said what reversed. But that's not really
important.
Once the first one is hidden, my kAXUIElementDestroyedNotification gets
called and that then tries to remove the notification. The call to
AXObserverRemoveNotification then takes about 3 seconds (and seems to
timeout).
This info should apply to Carbon as well as Cocoa.
We try to send our notifications asynchronously - so that if your
handler calls back into accessibility we don't deadlock (till timeout).
However, under some circumstances, our notifications can get sent
synchronously. E.g. if we blast out a bunch of them and fill up the
underlying communication queue. This behavior is, of course, subject to
change. I think you'll find the cutoff for reproducing your problem at
five or six windows in Jaguar.
To be safe you want to return from your notification handler as quickly
as possible - queuing up any significant work to be done elsewhere.
It sounds like you've come up with a solution using a timer.
I was thinking though, as long as I eventually CFRelease the observer
itself, do I still need to AXObserverRemoveNotification on each
notification
it is interested in. i.e. will it still leak if I don't. Currently I
have
one observer per application I am observing and when that app quits,
the
observer is released. Surely this should clean everything up, and if it
doesn't wouldn't that be considered a bug?
This should be fine.
-ME
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.