gnustep-dev
[Top][All Lists]
Advanced

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

Re: Slow application startup when using a theme


From: Eric Wasylishen
Subject: Re: Slow application startup when using a theme
Date: Tue, 10 Jan 2012 12:16:37 -0700

Hi Philippe,

> And there is a duplicate #import <Foundation/NSNotification.h>

Thanks, fixed.

>> - The code in [NSImage imageNamed:] could be simpified, not that the 
>> proxy is gone. We don't need to get the same image we just created from 
>> the dictionary.
>> 
>> - I don't quite understand what happens when we switch back from having 
>> a theme to not using one. Will the standard GNUstep images get reused? 
>> The question here is whether we send the notification 
>> GSThemeDidActivateNotification when there is no theme at all.
> 
> I tested it (by adding NSLog) and it works : when going back from Neos
> to native GNUstep theme, -themeDidActivate is called and the paths are
> recomputed and the bitmaps loaded if needed.
> 
> Nitpicking : instead of registering for GSThemeDidActivateNotification
> for every image (and getting x notifications), it would probably be more
> efficient to register only once (but how ?) and check every image cached
> in nameDict.

Good idea.. just implemented that by moving the notification registration to
+[NSImage initialize]. Theme switching actually feels noticeably faster now
which is odd; I wasn't expecting NSNotificationCenter to have much overhead.

> Anyway, this is a nice improvement of the code and of the user
> experience, I like it when my computer seems faster :o)

Great :-)

-Eric



reply via email to

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