yt-project/yt

AMRGridPatch objects take up too much memory

Open

#4,685 opened on Oct 4, 2023

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Python (315 forks)auto 404
help wantedperformance

Repository metrics

Stars
 (556 stars)
PR merge metrics
 (PR metrics pending)

Description

Long ago, we optimized the AMRGridPatch objects for memory size. As a result of the gradual drift in focus, we've stopped using __slots__, among other things.

For the Santa Fe Lightcone dataset (RD0036), the grids (~400k) take up about 3.4 gb of data, which translates to 8.5kb per object. This is not that much per grid! But it's still a lot, when you add it all up.

We can either attempt to optimize these grids, which would be feasible but probably annoying, or we could move to the grid tree wholesale.

Contributor guide