django
django copied to clipboard
Optimized ModelAdmin.changelist_view if actions are not used
This avoids calling len()
on cl.result_list
.
Does it result in a meaningful performance improvement for your project? Considering the default list_per_page = 100
and the default delete action, I guess this won't help much for most users.
@timgraham
Does it result in a meaningful performance improvement for your project?
Yes - I've not done this just for fun, but only after debugging it.. ;)
Considering the default list_per_page = 100 and the default delete action, I guess this won't help much for most users.
IIRC it was for a model/table with millions of rows etc - so while certainly something uncommon ("not for most users"), it is likely to make a (small) difference already with smaller tables.
Let me know if I should look into resolving conflicts here.
I'm doing some PR housekeeping. I'll be closing this since I believe that the diff is too outdated to review it properly.
@blueyed if you want this PR to be re-reviewed, could you please rebase onto main and ping me so I re-open it? Please include a more explicit description about what problem is the removal of the len()
call solving. Thanks!