compressed *.npy for temp files #1170
JamiePringle
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Thanks for the info and idea, @JamiePringle. If you say that storing as zipped spy files does not really have downsides, then I think we can just give it a try. Can you create a Pull Request on GitHub? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all --
I propose that the temporary *.npy files be compressed with the gzip module. This is a significant win for me, since a single year run for me produces a 13Tb temporary file if uncompressed, and a 4Tb file if compressed. For more modest sized projects the difference will be less important. However, I see no downside in compressing these files, since for most archetectures it reduces both the size of the files and the IO time. The changes are modest; the files are opened with gzip.open() when the files read and written.
The only downside is that any other code that reads these temporary files will need to be altered; but the effort in doing so is minor, as can be seen in the following diffs.
I have made and tested the changes with baseparticlefile.py and particlefilesoa.py. If this goes forward, the AOS file would have to be changed and tested.
The changes to baseparticlefile.py are
and the changes to particlefilesoa.py are
If this idea seems good to people, I could figure out github and make the changes to baseparticefile.py and particlefilesoa.py there.
Jamie
Beta Was this translation helpful? Give feedback.
All reactions