I noticed a massive performance problem today after updating to the latest newforms-admin. Attempting to load a change page for one of my models that has another model edited inline pegged the CPU and started eating memory. I tracked it down to this code in /django/newforms/models.py, in the init for BaseModelFormSet?:
if self.queryset:
kwargs['initial'] = [initial_data(obj) for obj in self.get_queryset()]
Problem is self.queryset is an unfiltered queryset for the entire inline-edited model, it is not filtered by the pk of the parent instance until the self.get_queryset() call in the 2nd line, and "if self.queryset:" actually (apparently) calls __len__ on the queryset. __len__ in turn calls _get_data(), which in my case meant going and retrieving over 800,000 rows from the database, bringing my machine to its knees. Fix (attached) is simple:
if self.queryset is not None:
kwargs['initial'] = [initial_data(obj) for obj in self.get_queryset()]