Page MenuHomePhabricator

[lib] Use batch Blob service endpoints in processHolders action
ClosedPublic

Authored by bartek on Oct 9 2024, 2:18 AM.
Tags
None
Referenced Files
F3518790: D13657.diff
Sun, Dec 22, 8:39 PM
Unknown Object (File)
Thu, Dec 19, 11:21 AM
Unknown Object (File)
Thu, Dec 19, 11:20 AM
Unknown Object (File)
Thu, Dec 19, 11:20 AM
Unknown Object (File)
Sun, Dec 15, 1:02 AM
Unknown Object (File)
Wed, Dec 4, 11:32 PM
Unknown Object (File)
Wed, Dec 4, 3:08 PM
Unknown Object (File)
Nov 20 2024, 9:30 AM
Subscribers

Details

Summary

Address ENG-9355.
When processing holders, we can make 1-2 batch Blob HTTP calls instead of M+N calls for every single processed holder.

Depends on D13656

Test Plan

Start a DM thread, set image thread avatar, then reset back to emoji. With Redux devtools and console logs verify that actions are successful.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Oct 9 2024, 3:05 AM
bartek added inline comments.
lib/actions/holder-actions.js
78–96 ↗(On Diff #45007)

Generally this scenario for failedRequests is very rare, in 99% cases the result will be success or error (early return) so I don't think we should worry much about n^2 here

kamil added inline comments.
lib/actions/holder-actions.js
78–96 ↗(On Diff #45007)

I would use Set with items like JSON.stringify(failedItem), but keep in mind to recreate the object to make sure key order will be deterministic in stringified objects

This revision is now accepted and ready to land.Oct 10 2024, 3:14 AM

Use approach with Set of JSON-stringified items