color

        | flags aColor |
        
        true ifTrue: [ ^ Color transparent ].
        
        flags := 0.
        self isThisAnOverride ifTrue: [ flags := flags bitOr: 4 ].
        currentCompiledMethod sendsToSuper ifTrue: [ flags := flags bitOr: 2 ].
        self isThereAnOverride ifTrue: [ flags := flags bitOr: 1 ].
        aColor := {
                Color transparent.
                Color tan lighter.
                Color green muchLighter.
                Color blue muchLighter.
                Color red muchLighter.  "has super but doesn't call it"
                (Color r: 0.94 g: 0.823 b: 0.673).      "has sub; has super but 
doesn't call it"
                Color green muchLighter.
                Color blue muchLighter.
        } at: flags + 1.

        ^aColor! !


BTW why do we create all the time this array?




On Jan 20, 2010, at 6:56 PM, Adrian Lienhard wrote:

> Ok, in the class Morph it is not really smooth, also on my MacBook Pro.
> 
> I quickly did some profiling and came up with the following speedups (i.e., 
> experimental hacks):
> 
> <BrowserSpeedup.1.cs>
> 
> Is it better now?
> 
> Cheers,
> Adrian
> 
> BTW, not GC makes it slow but often recomputing the method list. Also, button 
> colors are computed expensively, even though they are not used.
> 
> 
> On Jan 20, 2010, at 17:56 , Levente Uzonyi wrote:
> 
>> On Wed, 20 Jan 2010, Mariano Martinez Peck wrote:
>> 
>>> On Wed, Jan 20, 2010 at 5:44 PM, Adrian Lienhard <[email protected]> wrote:
>>> 
>>>> Smalltalk garbageCollect
>>>> 
>>> 
>>> hahahaha sorry. As you said "a full GC" I imagined that there was another
>> 
>> There is: incremental gc. You can trigger it with Smalltalk 
>> garbageCollectMost.
>> 
>> 
>> Levente
>> 
>>> kind of GC (like gemstine) that I was not aware of  :)
>>> 
>>> 
>>>> 
>>>> On Jan 20, 2010, at 17:37 , Mariano Martinez Peck wrote:
>>>> 
>>>>> On Wed, Jan 20, 2010 at 5:33 PM, Adrian Lienhard <[email protected]>
>>>> wrote:
>>>>> 
>>>>>> just a wild guess: maybe its a GC edge case?
>>>>>> 
>>>>>> When it happens, trigger a full GC and see if it is still slow...
>>>>>> 
>>>>>> 
>>>>> how do you do that Adrian ?
>>>>> 
>>>>> 
>>>>>> Adrian
>>>>>> 
>>>>>> On Jan 20, 2010, at 17:26 , Gary Chambers wrote:
>>>>>> 
>>>>>>> A good few months back I noticed similarly inexplicable slowness (that
>>>> I
>>>>>>> mistakenly ascribed to some changes...). Went away after image
>>>>>>> save/restart... maybe that kind of thing has happened.
>>>>>>> 
>>>>>>> Regards, Gary
>>>>>>> 
>>>>>>> ----- Original Message -----
>>>>>>> From: "Igor Stasenko" <[email protected]>
>>>>>>> To: <[email protected]>
>>>>>>> Sent: Wednesday, January 20, 2010 4:16 PM
>>>>>>> Subject: Re: [Pharo-project] A dog-slow browser
>>>>>>> 
>>>>>>> 
>>>>>>>> 2010/1/20 Gary Chambers <[email protected]>:
>>>>>>>>> Super quick here... (1.1 latest updates, admittedly a quad-core, only
>>>>>> one
>>>>>>>>> used though...)
>>>>>>>> 
>>>>>>>> I have to take my words back.
>>>>>>>> Strange, very strange.. its now magically started working quite fast..
>>>>>>>> As i said, first time i run it, it was flickering the hourglass mouse
>>>>>>>> cursor each time i switching between methods in browser.
>>>>>>>> What was it? And why it disappears? Any suggestions?
>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Regards, Gary
>>>>>>>>> 
>>>>>>>>> ----- Original Message -----
>>>>>>>>> From: "Marcus Denker" <[email protected]>
>>>>>>>>> To: <[email protected]>
>>>>>>>>> Sent: Wednesday, January 20, 2010 3:47 PM
>>>>>>>>> Subject: Re: [Pharo-project] A dog-slow browser
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On Jan 20, 2010, at 4:35 PM, Igor Stasenko wrote:
>>>>>>>>>> 
>>>>>>>>>>> 2010/1/20 Marcus Denker <[email protected]>:
>>>>>>>>>>>> 
>>>>>>>>>>>> On Jan 20, 2010, at 4:28 PM, Igor Stasenko wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Please, don't take it as a offense, but as a constructive critics
>>>>>> :)
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Pharo-core browser is awfully slooow!
>>>>>>>>>>>>> 
>>>>>>>>>>>> Pharo core? Or Pharo dev?
>>>>>>>>>>>> 
>>>>>>>>>>> core
>>>>>>>>>> 
>>>>>>>>>> It should not... it uses the fast fonts, no syntax highligting...
>>>>>>>>>> In essense, it should be the same performance than Squeak 3.9.
>>>>>>>>>> 
>>>>>>>>>> Is it slower than that? I can not see any problem (the curse of a
>>>> fast
>>>>>>>>>> machine?)
>>>>>>>>>> 
>>>>>>>>>> Marcus
>>>>>>>>>> 
>>>>>>>>>> --
>>>>>>>>>> Marcus Denker -- http://www.marcusdenker.de
>>>>>>>>>> INRIA Lille -- Nord Europe. Team RMoD.
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>> [email protected]
>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> Pharo-project mailing list
>>>>>>>>> [email protected]
>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Best regards,
>>>>>>>> Igor Stasenko AKA sig.
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Pharo-project mailing list
>>>>>>>> [email protected]
>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Pharo-project mailing list
>>>>>>> [email protected]
>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> [email protected]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>> 
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [email protected]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [email protected]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>> 
>>> 
>> 
>> _______________________________________________
>> Pharo-project mailing list
>> [email protected]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to