On 22 Nov 2007, at 22:39 , Tudor Girba wrote:
I believe that here there are two points under discussion, each with 2 subpoints: A1) the reasons for wide classes A2) the solutions for wide classes
B1) the reasons for collective behavior
To save memory.
Each moose element has a back pointer to its model. This is 4 byte per element, ie 4 MB per 1 Mio elements. Which are realistic maybe even low numbers when analysing histories or traces. With collective behavior the memory footprint is (4 + F) * M * T, where F is the size of an anonymous class, M is the number of models and T is the number of element types used per model. Given that F is about 80 byte (including object headers and metaclasses etc pp) and T maybe about 25, that is 2 KB = 0.002 MB per Model.
B2) the solutions for collective behavior
I propose to talk about each of these two points individually, because they are not the same to me.