<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">Hi all --<div class="mb_sig"></div><div class="mb_sig"></div><div><br></div><div>What is the best growing strategy we currently have and can we use it consistently in the image?</div><div><br></div><div>1) HashedCollection (i.e., Dictionary etc.)</div><div>- growing is rather clever via prime table and max. 75% load factor</div><div>- see #growSize</div><div><br></div><div>2) OrderedCollection</div><div>- grow if less than 50% free space (see #makeRoomAt*)</div><div>- grow by 100% (see #growAt*)</div><div><br></div><div>3) WriteStream (e.g., String streamContents: [...])</div><div>- !! grow by 100% (at most 1 Million !) via #grownBy: for #nextPut:/#pastEndPut: (and #nextPutAll: for Strings)</div><div>- grow by min+25% via #growTo: for #nextPutAll: (for non-strings)<br></div><div><br></div><div>---</div><div><br></div><div>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.</div><div><br></div><div>Best,</div><div>Marcel</div></div>