This pull request is a very nice surprise.
I’ve been struggling with this for the last couple of months. I ended up splitting off a new Katello instance to handle pulp_deb. I also threw 40GB of ram at it and it works well enough to be useable. So I’m pleased as punch to see this optimization under development.
Thanks for tackling this!