[squeak-dev] The Trunk: Multilingual-ul.254.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 25 15:48:08 UTC 2021


Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.254.mcz

==================== Summary ====================

Name: Multilingual-ul.254
Author: ul
Time: 25 January 2021, 4:45:35.267328 pm
UUID: ba4ade3a-e1eb-4bfd-b130-a46de80bfe0c
Ancestors: Multilingual-eem.253

- speed up MultiByteFileStream >> #upToEnd by processing the file in larger chunks and reusing the implementation of StandardFileStream if the stream is binary

=============== Diff against Multilingual-eem.253 ===============

Item was changed:
  ----- Method: MultiByteFileStream>>upToEnd (in category 'public') -----
  upToEnd
+ 	"Answer a subcollection from the current access position through the last element of the receiver."
  
+ 	| remainingEstimate |
+ 	self isBinary ifTrue: [ ^super upToEnd ].
+ 	remainingEstimate := self size - self position.
  	^self collectionSpecies
+ 		new: remainingEstimate
- 		new: self size - self position
  		streamContents: [ :stream |
+ 			| elements chunkSize |
+ 			chunkSize := remainingEstimate min: 20000.
+ 			[ (elements := self next: chunkSize) isEmpty ] whileFalse: [
+ 				stream nextPutAll: elements ] ]!
- 			| element |
- 			[ (element := self next) == nil ] whileFalse: [
- 				stream nextPut: element ] ]
- !



More information about the Squeak-dev mailing list