Building infinite tree
Some settings (likely strong gravity + prevent overlapping) sometimes lead to excessive memory usage and hang. It is probably because some nodes are very close to each other.
Ways to fix this:
- memory usage limit (bumpalo size)
- tree depth limit (compute a threshold using the power law?)
- dynamic quadtree size (problem: non-commutative, produces unbalanced trees, but balancing algorithms are more expensive)