[FIX] RE: Balloon3D blues...

Bob Arning arning at charm.net
Fri May 18 16:28:51 UTC 2001


On Fri, 18 May 2001 18:11:26 +0200 "Wiebe Baron" <wiebe at cosmocows.com> wrote:
>I've tracked down the renderer recycling problem:
>
>B3DPrimitiveRasterizer>>mainLoop calls:
>	...
>	textures _ IdentityDictionary new: textures capacity.
>
>
>This causes an exponential growth (why???).

Ah! 

- #capacity is the total number of slots (i.e. #size plus empty slots)
- #new: figures you want that many items and adds a bit more to make hashing more efficient

	(Set new: 10) capacity ==> 14
	(Set new: 14) capacity ==> 20
	(Set new: 20) capacity ==> 28
	(Set new: 28) capacity ==> 38
	(Set new: 38) capacity ==> 52
	(Set new: 52) capacity ==> 70

Cheers,
Bob





More information about the Squeak-dev mailing list