My django app is super slow since I migrated to pythonanywhere. I do have the faint idea that I might run into some limit of some but I don't know what it is. I put in a lot of timers and one of the loops that runs on the old cloud space (the cheapest Hetzner) in 0.8 sec now needs 15-20 secs.
So the first thing I did after reading a little bit here is that I migrated from sqlite to mysql. This did not change anything. There are some nested loops indeed, but depth is max 2-3 and I have like 40 entries in my database.
What is odd, is that I measured in my loops for every loop the time and it is in the area of 0.003secs per loop, which adds up to 0.14 secs. But then assigning the result to the context dict takes maybe 15 secs or so. This does not seem right and I wonder into which limitation I run. Testing on the old system and on my pc yields results always <1 sec for the whole page.
I also checked the template rendering by just showing an empty page which did not alter the time at all. Also there only is this one view.
CPU usage is 5% according to the dashboard and does not change during the day to a value > 10%.