Commit e6905ab
committed
Preload data for CLI fit-grains
A while back, we started lazily loading the data when a
frame-cache imageseries was opened. This was so that a user could
open an imageseries and investigate things like the shape and metadata
before actually performing the data load.
For the CLI running fit grains, however, the data preload can be very
helpful, because all the processes in the multiprocessing can share
the loaded data if `fork` multiprocessing is being used (such as is
the case for Linux).
We restore that behavior in this PR.
Before this PR, a frame cache that required 70 GB of RAM to load in
the sparse arrays (which is not uncommon) would end up being loaded
separately on every process, which would result in 70 GB times the
number of processes of RAM being taken up (easily requiring terabytes
of RAM).
Now, we ensure the data is preloaded, and the fork multiprocessing
enables all 70 GB to just be shared with every process.
Signed-off-by: Patrick Avery <[email protected]>1 parent 20bb998 commit e6905ab
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
389 | 399 | | |
390 | 400 | | |
391 | 401 | | |
| |||
0 commit comments