Commit graph

74 commits

Author SHA1 Message Date
4fa07de299 support logs for manual color changes
it writes to our discord server, owo!
2020-08-20 22:25:41 -07:00
6821c2b734 Support tool: Remove layer from item
Heck yeah, let's clean these fuckers up!
2020-08-20 21:40:05 -07:00
47d22ad25c Build cached zones, stop querying on server
In this change, we cache the zones table as part of the JS build process. This keeps the database as our source of truth, while aggressively caching the data at deploy time.

See the new README for some rationale!

I tested this by pulling up dev Honeycomb, and observing that we no longer run db queries to `zones` in the new traces for the wardrobe page. (It's a good thing we did it this way, because I noticed some code in the server that was still loading the zone anyway, and fixed it here!)
2020-08-19 17:50:05 -07:00
7a3a7eeaf9 update test snapshots 2020-08-17 18:49:54 -07:00
4977f1ee54 Revert "cache zone data"
This reverts commit 0f7ab9d10e.

The Production Vercel deploys don't seem to like how I did this build trick, even though the Preview deploys seem fine with it 🤔 Reverting for now, sent a message to Vercel support.
2020-08-17 18:49:37 -07:00
a3423cd6d6 cache asset manifests in the db
Here's just some simple caching: we try to load the asset manifest from the db with the rest of the asset. If it's not present, we load it via HTTP, and write it to the database.

I might try to do a bulk write of manifests at some point, too.

This is because I noticed that one of the main bottlenecks in most of the endpoints now (and definitely the highest-variance) was loading from images.neopets.com.

Another approach I considered was HTTP/2 to load the manifests, because it kinda looks like the server is refusing to open all these sockets at once and effectively does the requests in waves? But images.neopets.com doesn't support HTTP/2 right now anyway, so oh well! (And that would have probably cut us down to ~250ms of HTTP time still, instead of ~600–700. Also, why is network out of Vercel so slow? :p)
2020-08-17 17:50:01 -07:00
0f7ab9d10e cache zone data
I noticed that, while looking up zone data from the db is near instant when you're on the same box, it's like 300ms here!

In this change, we start downloading zone data into the build process. That way, we can have a very fast and practically-up-to-date cache (I'm not sure I've changed it in many years), while being confident that it's in sync with the database source of truth (for things like join queries).
2020-08-17 15:28:05 -07:00
b300718b4a itemSearchLoaders should prime item loader cache
Another perf issue I noticed in Honeycomb for the SearchPanel operation! We re-load the items again by ID, even though we already got them by name. Let's stop that!
https://ui.honeycomb.io/openneo/datasets/dress-to-impress--2020-/trace/aMuhsTjQFZY
2020-08-17 01:41:38 -07:00
d621b4c1a7 fix caching for petTypeLoader
Oops, of course, we weren't actually taking proper advantage of the dataloader here! The queries got over-complicated, but more importantly, subsequent requests to the same loader would re-submit the query!

I noticed it in the SearchPanel operation, in this Honeycomb trace:
https://ui.honeycomb.io/openneo/datasets/dress-to-impress--2020-/trace/aMuhsTjQFZY
2020-08-17 01:33:34 -07:00
6fc508589a don't do Honeycomb in test env 2020-08-17 01:27:05 -07:00
f7997b4dc9 some Honeycomb fixes
We got bit by the "can't run anything after the response finishes" thing

so I'm just forcing the response to wait for Honeycomb submit to finish

I hope this isn't like, just awful for perf lol. but puts to honeycomb seem fast?
2020-08-17 01:16:35 -07:00
ce028e4956 add Honeycomb logging
This will let me see traces for stuff!
2020-08-16 23:28:41 -07:00
281df33278 update snapshots 2020-08-14 22:10:07 -07:00
aa6ce12bbe add Neopets ID to layer support modal 2020-08-14 22:09:52 -07:00
380cbf543b add mutation to set item explicitly body specific
now that Support feature works!
2020-08-14 22:01:27 -07:00
02c959a837 add explicitlyBodySpecific to Item GQL
for the upcoming Support feature!
2020-08-14 21:12:13 -07:00
947d35fbfb update test snapshots
I skipped this in the past runs because I had a hard time getting consistency from the results… but they seem to be behaving now?

It really seemed like there were some races on certain query orders… maybe there still is, but my more-reliable connection today is making them resolve in a more consistent order?

Anyway if I see goofs again, I'll consider adding a snapshot matcher that isn't picky about query order 🤔
2020-08-09 23:03:53 -07:00
fce51875d9 add SWF to layer assets in Support tools 2020-08-01 22:54:30 -07:00
8fdc986ee9 can submit the actual body ID Support mutation!
it seems to actually be changing the things correctly aaaa
2020-08-01 15:30:26 -07:00
213f30b2f2 sketched out the pet compatibility chooser
can't actually set things properly yet, but you can scroll through options and see how it fits!
2020-08-01 14:12:57 -07:00
05fe511bda stop connection pooling
oof, got "too many connections" from mysql, this is probably gonna be a scaling issue in time… for now, stop requesting a pool of 5, even on dev lolol, and just go with a single connection per instance
2020-08-01 01:42:58 -07:00
0a9d736957 special color mutation actually working!
Note that there's a bug when switching back to the null case… when I look in the Apollo dev tools, it's definitely getting set in the cache correctly at the right time… but the query isn't updating for some reason? I'm hoping it's an Apollo bug that will fix itself someday with an upgrade!
2020-08-01 00:10:12 -07:00
2eb1c9b780 show the actual manual special color in support UI 2020-07-31 23:33:12 -07:00
f747bfb004 load special colors into support UI 2020-07-31 23:33:12 -07:00
ffde7172de enable HTTP caching for pet appearances 2020-07-22 23:08:28 -07:00
ac12f6bb55 oops, fix isNc and stop loading items early! 2020-07-02 20:06:04 -07:00
3c4354d14b update getValidPetPoses snapshot 2020-07-02 14:46:04 -07:00
4c78abee96 fix bug resolving item fields under pet outfit 2020-07-02 14:33:47 -07:00
Matt Dunn-Rankin
ade563ddcd server can read outfit data 2020-06-24 19:05:07 -07:00
Matt Dunn-Rankin
82078d20bb updated prod test snapshots 2020-05-31 16:08:26 -07:00
Matt Dunn-Rankin
03cde98eae fix bug querying depth on restricted zones 2020-05-31 16:08:17 -07:00
Matt Dunn-Rankin
caefc6610c fix bug loading species/color translation on pet 2020-05-31 16:00:59 -07:00
Matt Dunn-Rankin
ce81543957 add rarityIndex, isNc to API 2020-05-31 15:56:40 -07:00
Matt Dunn-Rankin
6f5e03da9c trim item search queries 2020-05-31 15:52:54 -07:00
Matt Dunn-Rankin
fb8ccee797 skip non-SWF (music) assets 2020-05-27 00:47:13 -07:00
Matt Dunn-Rankin
29b9fe48c5 use PetService to determine the correct pose 2020-05-23 13:55:59 -07:00
Matt Dunn-Rankin
bcdd9af806 transition to closest valid pose for species/color 2020-05-23 13:23:24 -07:00
Matt Dunn-Rankin
75a0fe2e8c refactor e/gp pairs to pose enum 2020-05-23 12:47:06 -07:00
Matt Dunn-Rankin
772917fde6 add unknown and UC to valid pet poses 2020-05-23 11:48:53 -07:00
Matt Dunn-Rankin
4d6a6faf4c compact the svg logs 2020-05-23 11:32:05 -07:00
Matt Dunn-Rankin
9c8a48a325 http caching for all color/species requests 2020-05-14 15:51:08 -07:00
Matt Dunn-Rankin
e18aba17c6 add svgUrl for image layers 2020-05-11 21:19:34 -07:00
Matt Dunn-Rankin
6757775fec change validPetPoses bit order, add dims to blob 2020-05-03 13:03:02 -07:00
Matt Dunn-Rankin
01c6cbcfdb reverse bit ordering in getValidPetPoses 2020-05-03 12:58:35 -07:00
Matt Dunn-Rankin
da0398b50b use bodyId, not speciesId, for pose transforms 2020-05-03 12:55:37 -07:00
Matt Dunn-Rankin
1bf33c14db use compressed validPetPoses to save network
it also has valid emotion/gp data in there too, which we'll use later!
2020-05-03 01:52:39 -07:00
Matt Dunn-Rankin
04a851a138 new endpoint for blob of valid pet poses 2020-05-03 01:04:34 -07:00
Matt Dunn-Rankin
f828686ac5 cache PetAppearance for quick pose switches 2020-05-02 22:37:52 -07:00
Matt Dunn-Rankin
6e1e0a5c0b show updated pet appearance in outfit preview! 2020-05-02 22:32:08 -07:00
Matt Dunn-Rankin
d9b447bbb4 omit glitched pet states, add IDs 2020-05-02 20:48:32 -07:00