Skip to content

Conversation

@Glitch752
Copy link
Contributor

Currently, the site sends multiple megabytes of unnecessary JSON as page props. This filters the data to not include unnecessary things like feedback, devlogs, etc.

I would actually argue that the GetAllGames endpoint should never return all this data, because it's:

  1. A pretty unmanageable amount of data, especially when the limit is set to its maximum of 1000; this means processing and sending way more data than is necessary most of the time
  2. Not really required for anything? I don't know why other users should even be able to get the feedback, plays, average ratings, etc. of others' games--much less have it sent to them every time they open the game list
  3. Pretty hard to come up with a situation where one would want this data for every game returned and not specific ones, so it's probably better to put that in a separate endpoint if still needed
  4. Wayyy too much to have a 100 request/minute limit. This sends like hundreds of Airtable requests for a single API request from what I can tell lol (at least users/100 + posts/100 + games/100 + plays/100 unless I'm going crazy)

I can make a more invasive change since it doesn't look like anything uses that other data from GetAllGames right now, but I wanted your opinion first.

@vercel
Copy link

vercel bot commented Oct 1, 2025

@Glitch752 is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

@SerenityUX
Copy link
Contributor

actually the intent of this is to pre-load it every hour or so. So it gets all the games and then can serve the individual shiba game pages immediately because it pre-built them

@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
shiba Ready Ready Preview Comment Oct 2, 2025 9:49pm
@Glitch752
Copy link
Contributor Author

yup, I noticed that. The API endpoint is still available for everyone to call, though, and it returns a bunch of unnecessary data from what I can tell

@Glitch752
Copy link
Contributor Author

maybe I'm being silly but it looks like the individual game pages use /api/gameStore/getGame instead for data? Either way, this currently only strips the extra data from the main page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants