How is a List paginated in a contract?

So in this scenario, I have a List, in the contract
But this List is infinite, a bunch of records in there
I want to get rid of the List in batches like pagination, 20 pieces of data per page, right?
How should it be used? I didn’t find a good solution, so if the data is too big, JSON will not be stored directly and will cause performance problems

If you want to do pagination a list (in Sophia) perhaps isn’t the right data structure. A Sophia list consists of cons cells (think of them as a single linked list if you like) so you need to access n-1 elements before you can reach the n:th element.

Not sure what JSON has to do with it :confused: