Yikes!  Well, that's why ffx is slow. 2.4 GB is pretty outrageous. Looking at the code, it looks like you generate 100^3 == 1 million events, each of which is 2.4 KBytes. that seems wrong -- a single even should not use 2.4KB, since a single event is just four float pt numbers. And generating a million ... seems excessive.  I don't understand what the point of this is, but its certainly rather far from a minimal solution.