Sven Van Caekenberghe wrote:
Ben,

I ran your code.

[ PharoChangesCondenser condense ] timeToRun. ==> 0:00:00:13.315 (that's 13 seconds)

I see no differences: {#sameAfter->64066. #diffAfter->0}

This Windows issue is annoying, it is just file manipulation, right ?

Sven 
  

Thanks Sven.  Thats a great result. 13 seconds wow!  Knowing that is what it should be, I'll try some profiling.
cheers -ben

 
On 13 Apr 2014, at 13:29, Ben Coman <[email protected]> wrote:

  
Its cool the new PharoCondenseChanges was integrated 30821, presumably to be used for Pharo 3 release.  I have a problem running it on MS Windows (reported on Case 12729), but that is not critical for the Release since presumably for that it only needs to run properly on one platform. 

However while investigating my MS Windows problem, it seemed that some sources before and after were not the same.  This could be an consequence of the MS Windows problem, so I was hoping that someone could report the result of the following code on non-Windows platforms (presuming that this provides a valid #condense function check.)
---------
cacheMethodSourcesBlock :=
[       | classes methods methodSources |
        classes := (Smalltalk globals select: [  :g | g isClass ]) values.
        methods := classes flatCollect: [ :c | c methods ].
        methodSources := Dictionary new.
        methods do: [ :m | methodSources at: m printString put: m asString ].
        methodSources
].

methodSourcesBefore := cacheMethodSourcesBlock value.

PharoCondenseChanges condense.  "btw, this took over an hour for me. Is that reasonable?"

methodSourcesAfter := cacheMethodSourcesBlock value.

sameAfter := Dictionary new.
diffAfter := Dictionary new.
methodSourcesBefore keys do:
[       :methodName |  | methodSourceBefore methodSourceAfter |
        methodSourceBefore := methodSourcesBefore at: methodName.
        methodSourceAfter := methodSourcesAfter  at: methodName.
        methodSourceBefore = methodSourceAfter 
            ifTrue: [ sameAfter at: methodName put: { #beforeAndAfter -> methodSourceBefore } ]
            ifFalse: [ diffAfter at: methodName put: { #before -> methodSourceBefore . String cr, String cr. #after -> methodSourceAfter }]
].

{ #sameAfter -> sameAfter size . #diffAfter -> diffAfter size } inspect
---------

cheer -ben
    


  

Reply via email to