openneo-blog/_posts/2024-10-03-perf-upgrades.md
2024-10-04 17:50:20 -07:00

4.2 KiB
Raw Blame History

layout title date author excerpt
post This week in DTI: Performance upgrades! 2024-10-03 14:47:00 -0700 Matchu <p>Things got a bit slow this week—so we made three changes to improve pageload times across the site! <em>(Also, I'm job-hunting right now!)</em></p>

Hi, everyone! You might've noticed earlier this week that DTI had started to stutter a bit. We experienced a bit of a traffic spike, and pageloads would sometimes start taking a few seconds. (My phone was ringing off the hook to let me know!)

Screenshot of my email inbox: many emails on Sep 30, from health@openneo.net, saying "GlitchTip: Dress to Impress is down" or "is back up"

When we dug into it, there wasn't any specific cause—just a bit more pressure causing our database to max out our server's CPU a bit too often.

Rather than just throw more CPU at the problem (always an option, but never a cheap one!), we popped open the slow query log. We found the worst offenders, and started getting to work fixing database queries that have always been a bit slow—in some cases, for many years!

Here's the three big changes we made:

  • Item searches: We sped up some of our tougher filters (occupies and fits) from taking a couple seconds at worst, to always nearly instant! (We did this by "caching" more data about the item's appearance onto the item record itself.)
  • Trade listings: Earlier this year, we added the Offering/Seeking pages to Classic DTI, and built them faster than the Impress 2020 versions. Now, we've deleted Impress 2020's slower version of the page, redirecting to Classic's faster one instead. (This brings us closer to [merging the apps]({% post_url 2024-09-20-state-of-dti-2024 %}#simplicity), too!)
  • Modeling progress: When we're missing data for new items, we ask for help at the bottom of the homepage—and we used the same upgrades from item searches to make this faster, too. (We also fixed the long-standing bug of Maraquan items asking for more help than we need!)

And these changes don't just affect these features: when our CPU starts to peak, everything gets slower. And so when we make the site more efficient and stop hitting those limits, everything gets faster!

Since then, the site has been back to being steady, and I've been glad to see item searches—one of the most common things that happens on the site—run much faster for everyone!! And it's always a joy to clean up decade-old code and bring it closer to what it always deserved to be 🥰

Hope everyone's doing well, and that you've got fun Halloween plans! I'm excited to see your pets all dressed up again this year!!

By the way, I'm job-hunting right now!

After a few years consulting part-time, I'm looking for a full-time role again! (The tech layoffs came for me and my family, whuh oh—time to step it up!)

[Lore dump!] In addition to running Dress to Impress for 15 years, I've also been a senior engineer and tech lead at an edtech nonprofit (20152020), focused in B2B partnerships, team mentorship, and building integrated platforms to support multiple products across teams.

I'm primarily looking for remote roles hiring in the United States, leveled at senior or staff—but some of that could be flexible for the right situation!

Right now, I'm especially interested in:

  • Consulting firms, especially with a focus in nonprofit
  • Stewarding critical integrations long-term, like identity or payments
  • Shifting to information security, or technical writing
  • Engineering management, for the right human-focused team

If you happen to have an opportunity, please reach out and let me know! It'd help me out a lot.

Thanks for taking a look!
—Matchu