Christoph Thiede uploaded a new version of Collections to project The Inbox: http://source.squeak.org/inbox/Collections-ct.1060.mcz
==================== Summary ====================
Name: Collections-ct.1060 Author: ct Time: 27 December 2023, 11:59:34.927399 pm UUID: 97958301-3160-e74c-9b2f-46c22493a381 Ancestors: Collections-mt.1058
Speeds up printing of large sets. Analogously to dictionaries, do not sort and enumerate all their items beyond a threshold.
=============== Diff against Collections-mt.1058 ===============
Item was changed: ----- Method: Set>>printElementsOn: (in category 'printing') ----- printElementsOn: aStream "Like dictionaries, indicate some human-readable sort order." + self size > 100 ifTrue: + [aStream + nextPutAll: '(size '; + print: self size; + nextPut: $). + ^ self]. + self sortedSafely printElementsOn: aStream.!
Can we extract the threshold and explain it? Is it the same threshold as the one for dictionaries?
Best, Marcel
Am 27.12.2023 23:59:59 schrieb commits@source.squeak.org commits@source.squeak.org:
Christoph Thiede uploaded a new version of Collections to project The Inbox: http://source.squeak.org/inbox/Collections-ct.1060.mcz
==================== Summary ====================
Name: Collections-ct.1060 Author: ct Time: 27 December 2023, 11:59:34.927399 pm UUID: 97958301-3160-e74c-9b2f-46c22493a381 Ancestors: Collections-mt.1058
Speeds up printing of large sets. Analogously to dictionaries, do not sort and enumerate all their items beyond a threshold.
=============== Diff against Collections-mt.1058 ===============
Item was changed: ----- Method: Set>>printElementsOn: (in category 'printing') ----- printElementsOn: aStream "Like dictionaries, indicate some human-readable sort order."
+ self size > 100 ifTrue: + [aStream + nextPutAll: '(size '; + print: self size; + nextPut: $). + ^ self]. + self sortedSafely printElementsOn: aStream.!
squeak-dev@lists.squeakfoundation.org