Re-migrations take nearly as long as initial migrations
With a large repository, re-migrations take a very long time.
<jsherrill> i was also planning on testing re-migration time with that repo <jsherrill> and that seemed really really slow <jsherrill> but i wasn't sure if that was related to the fact that not all of the units migrated properly <jsherrill> so was waiting for it to be fixed to test for sure <jsherrill> like it seemed like it took ~an hour to re-migrate it <jsherrill> i'm sure there is a lot of low-hanging fruit performance wise <jsherrill> and i'm less concerned about initial migration time
Don't iterate all lazy content every time we re-migrate
Push some of our Python-level checks into database query logic to significantly reduce the # of individual queries we make and the amount of content we need to iterate over / prefetch for.
closes: #6111 https://pulp.plan.io/issues/6111