I have a python script which basically take the minute wise electrical load data, solar production data and does some energy flow analyses. It's fairly complex algorithm which involves a lot of loops and huge DataFrame, matrices, and arrays. When I work on the script for sometime it takes, on an average 35s to execute. All the fans of my machine start to blow.
But suppose I leave my PC for 3-4 hours and come back, the same code takes more than 120s to execute.
Why is this so and is there a way I could avoid this?
Any help would be appreciated.