-
Notifications
You must be signed in to change notification settings - Fork 3
Description
There are currently 479+ pilots, 88+ ships, 356+ upgrades (not including epic?) and 120 list archetypes (seems to be a hardcoded cap rather than the actual number) if you sort from launch to 10/21. Most people are only going to look at the top 10-20 items in each list so including the entire group in each page load means a lot of extra client side image loading and content processing that probably could be avoided.
Sadly, pagination isn't just a drop in solution because metawing uses Rankers classes rather than a customized model to build the sql query and return objects. I believe that you could add offset and limit to the query inside the ranker,
@ships = Ship.fetch_query(ships_relation, attributes) > @ships = Ship.fetch_query(ships_relation, attributes).limit(25).offset(0)
Might not be necessary for ships and it might be easier to just implement manually rather than something like pagy. Probably worth starting with hard coded testing on pilots or upgrades to make sure that the work is going to result in real decreases in page load times.