django-simple-history icon indicating copy to clipboard operation
django-simple-history copied to clipboard

No pagination in admin list (a long history fails or super slow to load)

Open defigor opened this issue 2 years ago • 5 comments

Describe the bug There is no pagination available when view a list of history for an object. It causes very long load times or timeouts (depending on the configuration). So it loads the whole history of the object, instead of only N items at single time. Ideally it should be configurable how many items to load at single time.

To Reproduce Steps to reproduce the behavior:

  1. Create a model with history, ideally the model should have several big fields
  2. Create an object with a lot of history 100+ (or even better 1000+)
  3. Go to admin and view the list of history for this object
  4. Depending on your setup, it will take a long time to load the WHOLE history or will time out (in our case we have setup 30 seconds time out).

Expected behavior A pagination available for admin, that is available for standard (non-historical) models, that allows to load only N items.

defigor avatar Jan 27 '23 07:01 defigor

@defigor have you found a workaround the pagination issue?

vitormhenrique avatar Jun 27 '23 13:06 vitormhenrique

@vitormhenrique Nope, we didn't. It is still an issue.

defigor avatar Jun 27 '23 20:06 defigor

There seems to be an PR for this at the moment: #1220

jurrian avatar Sep 04 '23 09:09 jurrian

yeah, @RumitAP works with me and he implemented the pagination on for our solution and we wanted to make available for everyone.

vitormhenrique avatar Sep 04 '23 16:09 vitormhenrique

@vitormhenrique @RumitAP I am assuming now the PR is stale so I will continue to do it then.

jurrian avatar Nov 09 '23 12:11 jurrian