gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNotificationCenter's pointer abuse


From: Riccardo Mottola
Subject: Re: NSNotificationCenter's pointer abuse
Date: Mon, 13 May 2013 11:36:02 +0200
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.2

Hi,

On 05/13/13 10:05, Richard Frith-Macdonald wrote:
On 10 May 2013, at 12:23, Richard Frith-Macdonald <address@hidden> wrote:

I also removed the method caching ...  it was, as I thought, only a one line 
change to disable it. But since we are trying to mimic OSX behavior exactly, I 
thought we probably ought to remove it anyway.

As I recall this particular optimisation was really pretty irrelevant for most 
apps (it made a significant performance difference to some apps where the same 
notification was fired really frequently, but wasn't a show-stopper).
One thing I recall finding out when the notification code was rewritten was 
that different people use notifications in radically different ways.
Some generate vast numbers of notifications, to a few observers, some generate 
few notification but to lots of observers, and some actually add and remove 
observers much more often than they deal with notifications, or remove/add 
observers after each notification.
Right, I am a bit checking GWorkspace code, which is a lot of legacy code, complex and not written by me. I notice there are few observes, which get removed and put in place again from time to time, but there are potentially lots of notification floating around. They are used to keep "stuff" in sync (views, inspectors, browsers). I don't say it is bad, it actually makes sense in that application.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]