I have a formset in my application where there is a select field and
also a multiselect field in a form. In some object edit view, number
of times each form in the formset gets called increases with the
increase of number of relationships between objects in the db(see my
question on stackoverflow -
http://stackoverflow.com/questions/6591890/django-formsets-slow-on-many-to-many-relationships).
Because of the way formsets work this means the number of queries to
the db also increase and it causes an unacceptable latency in the
view. Although caching is required in the case of multiple requests
for the same view, I think the first improvement that should be made
is to have the repeated form as a property of formset object(in the
first time it gets instantiated) and then use that property as
required. Do you see any problems with this?