Page MenuHomePhabricator

[server] Always filter message queries by message creation time
ClosedPublic

Authored by ashoat on Mar 6 2022, 3:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 7:30 PM
Unknown Object (File)
Nov 17 2024, 2:03 PM
Unknown Object (File)
Nov 17 2024, 2:00 PM
Unknown Object (File)
Nov 17 2024, 1:55 PM
Unknown Object (File)
Nov 17 2024, 1:35 PM
Unknown Object (File)
Nov 17 2024, 11:31 AM
Unknown Object (File)
Nov 6 2024, 11:36 AM
Unknown Object (File)
Nov 2 2024, 8:32 AM

Details

Summary

This solves ENG-812: Improve perf of website load. By limiting the amount of messages that MySQL has to look at in order to resolve fetchMessageInfos, we speed up website load significantly.

On my local environment using the prod database, the query resolves in 0.5s instead of 20s.

Depends On D3348

Test Plan

I downloaded the prod database to my local machine and tested how long the query to load the website took. This change reduced it from 20s to 0.5s

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat requested review of this revision.Mar 6 2022, 3:55 PM

I realized I should probably gate this behind a hasMinCodeVersion given native needs D3350, D3352, and D3353 to work properly with this change. Just put up D3354 to gate the changes

benschac added inline comments.
lib/types/message-types.js
471

q: Could you add a comment here with the normalized amount of time here? I'm assuming it's two weeks at a glance but wasn't 100%.

Also, might just be me but it feels odd that there's a time value in message-types

On my local environment using the prod database, the query resolves in 0.5s instead of 20s.

It's great to hear that!

This revision is now accepted and ready to land.Mar 8 2022, 6:46 AM