Let's say we are running a webapplication for the Superhero Association. In there, there is a table of 1 000 000 super villains which need to be watched. Everytime a super hero gathers new information about villains he updates the table.
The table itself is paginated, sortable and filterable.
The user is on the first page of the table, all over there are 1 400 results, displayed are the first 5 results, sorted by strengt. A request is sent to the backend, it delivers the first 5 results.
The users edits the last two entries.
The user now switches to the next page. Again a request is sent to the backend to retrieve the next 5 super villains.
Since the list is sorted by strength and the user edits strength, the order changes. In this example, that means two things: The user stumbles again over the entries already edited + he skips the entries which silently slip on the previous page. Therfor we want to remember the order of the objects in the initial view at all time while editing and switching pages.
- Prefetching all the data. There is a potential of millions of entries, way too much data, that would not work.
- Prefetching only the IDs and then request single ids to retrieve the next full page. Similar concerns, the list might get way too large.
That can't be a problem that only the Superhero Association has, are there any best practices? Thanks in advance!