Hi all --
What is the best growing strategy we currently have and can we use it consistently in the image?
1) HashedCollection (i.e., Dictionary etc.) - growing is rather clever via prime table and max. 75% load factor - see #growSize
2) OrderedCollection - grow if less than 50% free space (see #makeRoomAt*) - grow by 100% (see #growAt*)
3) WriteStream (e.g., String streamContents: [...]) - !! grow by 100% (at most 1 Million !) via #grownBy: for #nextPut:/#pastEndPut: (and #nextPutAll: for Strings) - grow by min+25% via #growTo: for #nextPutAll: (for non-strings)
---
Well, using "String streamContents: [...]" is *really* slow for very large strings (e.g., > 100 MB) bc. it triggers a lot of full GCs bc. #grownBy: only adds a 1 megabyte at most per grow. Therefore, our JSON support suffers a serious performance impact when using #asJsonString on larger structures.
Best, Marcel