Having the packages tab open increases code compilation time by 15-20 seconds in 2019.2

What the f?

My code that would take 1-2 seconds to compile was suddenly taking upwards of 20 seconds and I had no idea why. Then I noticed that this was true for all my 2019.2 projects, but none of my 2018.4 projects, but after debugging for a while I accidentally found one 2019.2 project where my code still compiled fast… and the only difference? The packages tab wasn’t open.

What happens is that after making a code change you first get the normal spinning cog wheel in the lower right for the code compiling, but then that disappears and the editor is still completely frozen, and you can see a frozen cog wheel and “loading packages” in the packages tab which for me disappears after 15-20 seconds and then you can finally use the editor again. It’s seemingly reloading all the packages or something every time you make a code change and locking the entire editor while it does it, and this doesn’t happen in 2018.4, nor does it happen if the tab isn’t open.

I couldn’t find any mention of this anywhere. Seems like a pretty ridiculous performance regression. At least it’s easily avoidable.

UPDATE: It affects the time it takes to enter play mode as well. It more than quadruples it for the project I’m in right now. From 1-1.5 seconds to 5-6 seconds.

This doesn’t seem to happen in Unity 2019.3.