Data from views OR call data with js?

Posted by: mariner_warty.0e on 7 November 2022, 9:41 pm EST

  • Posted 7 November 2022, 9:41 pm 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.

  • Posted 27 December 2022, 3:21 pm EST

    hi,

    Yes, this will surely boost the performance let me know if you face any issues.

    Regards,

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels