Forums

Slow page load performance with a large number of formsets (over 25)

We are new to the Django framework and are currently building an application in PythonAnywhere. We have a couple of html pages where the volume of formsets that we are loading up varies from 25 to 100. We find that when we use a small number of formsets, the page loads very quickly. However, performance seems to degrade as the numbers increase.

It's not an issue with our SQL queries as when we load the same data into a HTML table instead of using formsets, it loads very quickly.

We need to load the data using formsets because we expect updates to each row from the user.

Has anyone encountered this problem? If so, is there a way to improve the performance of the formsets or are formsets not intended to be used with large volumes of data? If not, are there alternative options that we can use that allow users to modify the data in multiple rows returned by the query? Note - we don't want to send the user to a 'Pop-Up' or another screen to update data. Note 2 - We are using "Model" formsets, in particular "inlineformset_factory".