Posted 8 November 2022, 6:41 am EST
I have recently created app that is calling HUGE!! amount of data at once from 2 views (from multiple models) and I am sending that data from views to templates directly.
Then, I deployed it on heroku (and switched to postgres from sqlite). Now website is very slow. I can notice that page does not load at all until templates receives complete data.
Now I am thinking if I divide template in multiple parts and then use JS to make calls to views for json data, then display that data as page loads. This way, as page loads, js will also work in parts and data will be called in pieces.
I think this will work better, but I want to confirm this before getting back to working on this as it will take alot of time and I don’t want to do this for nothing.