'Interactive window in vscode is running extremely slow when it was quick before. What changed?

I am in the middle of trying to complete a project and it's extremely difficult to debug now that my vscode interactive window is running extremely slow. It takes about 5 minutes to complete a program. I ran my task manager (Windows 10) and I can see my script taking up about 6gb of memory, but I have 16gb of ram on my machine and like I said this was running faster before, so I'm confused. The major libraries I'm using for my script that I think would directly affect the interactive window behavior are gdal, matplotlib, seaborn and pandas.

I've tried restarting the python virtual environment kernel on vscode and it is still running slow. Yesterday, the same script with no modifications was running in the interactive window just fine at a reasonable speed, so I'm not sure what happened between yesterday and today. The interactive window just gets stuck on the following screen: Interactive window stuck



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source