Page MenuHomePhabricator

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

Authored by bartek on Wed, Oct 9, 2:18 AM.
Tags
None
Referenced Files
F2982819: D13657.id45068.diff
Wed, Oct 16, 5:54 AM
F2982338: D13657.id45070.diff
Wed, Oct 16, 2:45 AM
Unknown Object (File)
Tue, Oct 15, 7:25 AM
Unknown Object (File)
Tue, Oct 15, 6:39 AM
Unknown Object (File)
Tue, Oct 15, 6:38 AM
Unknown Object (File)
Tue, Oct 15, 12:06 AM
Unknown Object (File)
Fri, Oct 11, 7:27 PM
Unknown Object (File)
Fri, Oct 11, 3:55 PM
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.Wed, Oct 9, 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.Thu, Oct 10, 3:14 AM

Use approach with Set of JSON-stringified items