impress-2020/src/server/types
Matchu 299561d1e3 Paginate the user outfits page
My main inspiration for doing this is actually our potentially-huge upcoming Vercel bill lol

From inspecting my Honeycomb dashboard, it looks like the main offender for backend CPU time usage is outfit images. And it looks like they come in big spikes, of lots of low usage and then suddenly 1,000 requests in one minute.

My suspicion is that this is from users with many saved outfits loading their outfit page, which previously would show all of them at once.

We do have `loading="lazy"` set, but not all browsers support that yet, and I've had trouble pinning down the exact behavior anyway!

Anyway, paginating makes for a better experience for those huge-list users anyway. We've been meaning to do it, so here we go!

My hope is that this drastically decreases backend CPU hours immediately 🤞 If not, we'll need to investigate in more detail where these outfit image requests are actually coming from!

Note that I added the pagination to the existing `outfits` GraphQL endpoint, rather than creating a new one. I felt comfortable doing this because it requires login anyway, so I'm confident that other clients aren't using it; and because, while this kind of thing often creates a risk of problems with frontend and backend code getting out of sync, I think someone running old frontend code will just see only their first 30 outfits (but no pagination toolbar), and get confused and refresh the page, at which point they'll see all of them. (And I actually _prefer_ that slightly confusing UX, to avoid getting more giant spikes of outfit image requests, lol :p)
2021-11-01 19:33:40 -07:00
..
AppearanceLayer.js Use /api/assetImage for all image sizes 2021-08-19 17:56:09 -07:00
ClosetList.js Wire up the Remove button for item lists 2021-09-30 19:26:09 -07:00
Item.js Wire up the Remove button for item lists 2021-09-30 19:26:09 -07:00
MutationsForSupport.js Better handle editUsername when Auth0 update fails 2021-10-21 12:17:12 -07:00
Outfit.js Fix GraphQL docstrings 2021-05-27 16:51:31 -07:00
Pet.js Fix GraphQL docstrings 2021-05-27 16:51:31 -07:00
PetAppearance.js Fix GraphQL docstrings 2021-05-27 16:51:31 -07:00
User.js Paginate the user outfits page 2021-11-01 19:33:40 -07:00
Zone.js Use ES module syntax in backend instead of require 2021-02-02 22:26:55 -08:00