[squeak-dev] UTCDateAndTime updated for Squeak 4.6/5.0

David T. Lewis lewis at mail.msen.com
Mon May 25 17:18:20 UTC 2015


On Mon, May 25, 2015 at 10:48:20AM -0400, David T. Lewis wrote:
> On Sun, May 24, 2015 at 11:22:48PM +0200, Levente Uzonyi wrote:
> > On Sun, 24 May 2015, David T. Lewis wrote:
> > 
> > >UTCDateAndTime is a UTC based implementation of class DateAndTime with
> > >one instance variable representing the magnitude of the point in time,
> > >and another representing local time zone offset.
> > >
> > >I recommend loading with the SAR from http://wiki.squeak.org/squeak/6197,
> > >as maintaining this in Montecello is problematic.
> > >
> > >After the 4.6/5.0 release, I would like to suggest moving Chronology out
> > >of the Kernel package into its own package, so that changes in Chronology
> > >can be maintained in Montecello without conflicting with the rest of 
> > >Kernel.
> > >
> > >Spur notes: The Spur image provides a huge performance when loading this
> > >set of changes. There are two steps in the loading process in which all
> > >DateAndTime instances need to be #becomed into new instances. This is
> > >painfully slow in the traditional image (with or without Cog), and it is
> > >amazing fast in Spur.
> > 
> > Similar speed can be achieved in V3 images (on any VM), if all instances 
> > are exchanged in one shot. In LX-2.2.cs:
> > 
> > | oldInstances newInstances |
> > oldInstances := DateAndTime allInstances, TimeStamp allInstances.
> > newInstances := oldInstances collect: [ :each |
> > 	each class == DateAndTime
> > 		ifTrue: [ each asLXDateAndTime ]
> > 		ifFalse: [ each asLXTimeStamp ] ].
> > oldInstances elementsForwardIdentityTo: newInstances.
> > 
> > And in LX-4.1.cs:
> > 
> > | oldInstances newInstances |
> > oldInstances := LXDateAndTime allInstances, LXTimeStamp allInstances.
> > newInstances := oldInstances collect: [ :each |
> > 	each class == LXDateAndTime
> > 		ifTrue: [ each asDateAndTime ]
> > 		ifFalse: [ each asTimeStamp ] ].
> > oldInstances elementsForwardIdentityTo: newInstances.
> 
> Levente,
> 
> Thank you! I was not aware of that.

I updated the SAR at http://wiki.squeak.org/squeak/6197. Indeed it now loads
very quickly in a V3 image.

Dave


More information about the Squeak-dev mailing list