Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-9926: reduce memory footprint of meas_mosaic #7

Merged
merged 3 commits into from Mar 30, 2017
Merged

Conversation

PaulPrice
Copy link
Contributor

No description provided.

Reading the calexp is slow, uses excessive memory and unnecessary:
* the detector is available from the camera (no need to worry about cameras
  that don't index camera by dataId["ccd"]: we're only supporting HSC)
* the dimensions of the image are available from the calexp_md. This is
  a little dirty, but it's used elsewhere in this file and we only expect
  to have to support meas_mosaic a little longer.
Probably not important here, but good practice in general because it
guards against memory fragmentation.
We do this in two ways:
1. Use Pool with maxtasksperchild=1. This stops memory fragmentation
   from compounding, because although memory may be fragmented in each
   process, after each read the process exits and is replaced with a
   fresh slate.
2. Join the pool when done. This stops a bunch of python processes from
   hanging around when iterating over tracts in a single job.
@PaulPrice PaulPrice merged commit 2ecc8fd into master Mar 30, 2017
@ktlim ktlim deleted the tickets/DM-9926 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant