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: Gregory Casamento
Subject: Re: Slow application startup when using a theme
Date: Tue, 10 Jan 2012 14:47:50 -0500

I'm wondering how this change will effect the WinUXTheme and the
GnomeTheme.  Has anyone tested those?

They rely on activate as the place where all of the images are
rendered in memory from the native widgets.  I haven't tested this
yet, but I'm willing to bet that it's broken the dynamic themes.

GC

On Tue, Jan 10, 2012 at 2:16 PM, Eric Wasylishen <address@hidden> wrote:
> 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
>
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev



-- 
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com



reply via email to

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