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
Unknown Object (File)
Mon, Nov 11, 8:48 AM
Unknown Object (File)
Sun, Nov 10, 11:21 PM
Unknown Object (File)
Sun, Nov 10, 7:05 PM
Unknown Object (File)
Sat, Nov 9, 1:14 PM
Unknown Object (File)
Thu, Nov 7, 5:51 PM
Unknown Object (File)
Fri, Nov 1, 2:41 PM
Unknown Object (File)
Fri, Nov 1, 9:16 AM
Unknown Object (File)
Thu, Oct 31, 10:46 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