c3-time-domain / SeeChange

A time-domain data reduction pipeline (e.g., for handling images->lightcurves) for surveys like DECam and LS4
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Image delete products test is too slow #291

Closed guynir42 closed 3 months ago

guynir42 commented 4 months ago

I'm marking the models/test_image.py::test_image_products_are_deleted as a skipped. It takes up way too much time, and I think the reason is because of loading upstreams/downstreams for all the Cutouts and Measurements is just a terrible loop inside a loop (or recursion inside recursion).

This will probably sort itself out once we move to Cutouts as a single file object, and while there may still be a lot of measurements, the test will probably go faster.

If that doesn't fix the slowness of the test, we should look into why it is so slow.

In any case, the test should be reinstated once it is running fast.

whohensee commented 3 months ago

I speculate that this was related to the behavior of Cutouts as a list when running image.delete_from_disk_and_database, and it seems that with PR #302 which changed Cutouts to behave as a normal FileOnDiskMixin, this issue has been resolved.