Skip to content

Commit

Permalink
Branch: 17634-Update-Fuel-for-Pharo-13, Fixes #17634
Browse files Browse the repository at this point in the history
Update Fuel for Pharo 13

Remove custom hashed collections. They no long offer a performance advantage.
On the contrary, under certain conditions performance can be significantly worse.
  • Loading branch information
theseion committed Jan 18, 2025
1 parent 3bdc17f commit 51ac07b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 39 deletions.
28 changes: 12 additions & 16 deletions src/BaselineOfMorphic/BaselineOfMorphic.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ BaselineOfMorphic >> postload: loader package: packageSpec [

TextConstants initialize.

"Initialize Fuel"
FLLargeIdentityHashedCollection initialize.

Stdio stdout
nextPutAll: 'starting...';
lf.
Expand All @@ -285,13 +282,12 @@ BaselineOfMorphic >> postload: loader package: packageSpec [
#FreeTypeCache #FreeTypeSettings #FreeTypeSubPixelAntiAliasedGlyphRenderer
#FT2Constants #GIFReadWriter #GlobalIdentifier #HaloMorph
#CharacterScanner #ImageMorph #JPEGHuffmanTable #JPEGReadStream
#Locale #MczInstaller #MD5NonPrimitive
#MenuItemMorph #MenuMorph #RxMatcher #RxParser #RxsPredicate
#SHA1 #ShortIntegerArray #SystemProgressMorph #SystemWindow
#TestCase #TextContainer #TextDiffBuilder #ThumbnailMorph
#TransferMorph #UITheme #ZnByteEncoder #ZnConstants #ZnMimeType
#ZnNetworkingUtils #ZnServer #ZnSingleThreadedServer ) do: [ :each |
(Smalltalk globals at: each) initialize ].
#Locale #MczInstaller #MD5NonPrimitive #MenuItemMorph
#MenuMorph #RxMatcher #RxParser #RxsPredicate #SHA1 #ShortIntegerArray
#SystemProgressMorph #SystemWindow #TestCase #TextContainer
#TextDiffBuilder #ThumbnailMorph #TransferMorph #UITheme #ZnByteEncoder
#ZnConstants #ZnMimeType #ZnNetworkingUtils #ZnServer #ZnSingleThreadedServer )
do: [ :each | (Smalltalk globals at: each) initialize ].

BalloonMorph setBalloonColorTo: Color yellow.

Expand Down Expand Up @@ -324,12 +320,12 @@ BaselineOfMorphic >> postload: loader package: packageSpec [
PolymorphSystemSettings desktopColor: Color white.

#( #AbstractFont #BalloonMorph #Clipboard #EmbeddedFreeTypeFontInstaller
#FLCompiledMethodCluster #FLLargeIdentityHashedCollection
#FreeTypeFontProvider #GradientFillStyle #IconicButtonMorph
#KMLog #LogicalFont #LucidaGrandeRegular #OSEnvironment
#ScrollBarMorph #StrikeFont #SystemSettingsPersistence
#TabMorph #TaskbarMorph #TextAction #TextConstants #TextStyle )
do: [ :each | (Smalltalk globals at: each) initialize ].
#FLCompiledMethodCluster #FreeTypeFontProvider
#GradientFillStyle #IconicButtonMorph #KMLog #LogicalFont
#LucidaGrandeRegular #OSEnvironment #ScrollBarMorph
#StrikeFont #SystemSettingsPersistence #TabMorph #TaskbarMorph
#TextAction #TextConstants #TextStyle ) do: [ :each |
(Smalltalk globals at: each) initialize ].

LogicalFontManager current addFontProvider:
FreeTypeFontProvider current.
Expand Down
7 changes: 0 additions & 7 deletions src/STON-Core/STONReader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,6 @@ STONReader >> on: aReadStream [
readStream := aReadStream
]

{ #category : 'initialization' }
STONReader >> optimizeForLargeStructures [
self class environment
at: #FLLargeIdentityDictionary
ifPresent: [ :identityDictionaryClass | objects := identityDictionaryClass new ]
]

{ #category : 'parsing-internal' }
STONReader >> parseCharacter [
| char |
Expand Down
7 changes: 0 additions & 7 deletions src/STON-Core/STONWriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,6 @@ STONWriter >> on: aWriteStream [
writeStream := aWriteStream
]
{ #category : 'initialization' }
STONWriter >> optimizeForLargeStructures [
self class environment
at: #FLLargeIdentityDictionary
ifPresent: [ :identityDictionaryClass | objects := identityDictionaryClass new ]
]
{ #category : 'initialization' }
STONWriter >> prettyPrint: boolean [
prettyPrint := boolean
Expand Down
4 changes: 0 additions & 4 deletions src/STON-Tests/STONLargeWriteReadTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ Class {
STONLargeWriteReadTest >> materialize: string [
^ STON reader
on: string readStream;
optimizeForLargeStructures;
next
]

{ #category : 'private' }
STONLargeWriteReadTest >> reader: string [
^ (super reader: string)
optimizeForLargeStructures;
yourself
]

Expand All @@ -29,7 +27,6 @@ STONLargeWriteReadTest >> serialize: anObject [
^ String streamContents: [ :stream |
STON writer
on: stream;
optimizeForLargeStructures;
nextPut: anObject ]
]

Expand All @@ -39,6 +36,5 @@ STONLargeWriteReadTest >> serializeJson: anObject [
STON jsonWriter
on: stream;
prettyPrint: true;
optimizeForLargeStructures;
nextPut: anObject ]
]
4 changes: 2 additions & 2 deletions src/STON-Tests/STONReaderTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ STONReaderTest >> testDeepStructure [
structure := deepest.
1 * 1024 timesRepeat: [ structure := Array with: structure ].
structure := Array with: holder with: structure.
writer := STON writer optimizeForLargeStructures.
writer := STON writer.
ston := String streamContents: [ :out | (writer on: out) nextPut: structure ].
"After reading, the second pass will have to go down the structure to resolve the reference."
reader := STON reader optimizeForLargeStructures.
reader := STON reader.
result := (reader on: ston readStream) next.
self assert: result equals: structure
]
Expand Down
2 changes: 0 additions & 2 deletions src/STON-Tests/STONTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ STONTest class >> fastReadFromFileNamed: path [
readStreamDo: [ :stream |
STON reader
on: (ZnBufferedReadStream on: stream);
optimizeForLargeStructures;
next ]
]

Expand All @@ -29,7 +28,6 @@ STONTest class >> fastWrite: object toFileNamed: path [
do: [ :stream |
STON writer
on: stream;
optimizeForLargeStructures;
nextPut: object ] ]
]

Expand Down
1 change: 0 additions & 1 deletion src/STON-Tests/STONWriteReadCommentsTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Class {
STONWriteReadCommentsTest >> materialize: string [
^ STON reader
on: (STONCStyleCommentsSkipStream on: string readStream);
optimizeForLargeStructures;
next
]

Expand Down

0 comments on commit 51ac07b

Please sign in to comment.