Open sync-by-unito[bot] opened 2 years ago
➤ Bofu Chen commented:
Sam We found that some backend API usages are higher than the others and want to figure out if there are redundant API calls from Capture App.
➤ Tammy Yang commented:
Sam There are many redundant calls of Capture App. For example, the two top-right buttons all require API calls first which is weird.
A better UX will be
I think we mainly want to have some check of these sort of redundant calls in the App. Less is better, but we don't want significant change of the App architecture yet. I will leave this to you to share with us what are the redundant calls you plan to cut.
➤ Kenny Hung commented:
move to backlog because resource arrangement.
➤ Sam commented:
I'm not sure if this task (feat: add icon to indicate capture with caption ( https://app.asana.com/0/1201016280880500/1202071964488862/f )) is also hurting the backend.
➤ Tammy Yang commented:
Sam I think if the call is only made when user open the Capture detail page, then it's ok. If every time when users enter home page, App needs to send calls for ALL Captures displayed at home page, then we should update.
➤ Sam commented:
Tammy Yang,
When a user goes to the home page first time (app launch)
When a user refreshes the home page (pull to refresh)
Other cases do not trigger a call to the backend, for example, when
I remember James Chien mentioned before to prevent backend calls for every capture to get caption we need to change the schema of the Proof object in the capture lite app.
The home page shows the list of Proof objects, but the Proof object does not have a caption property. Therefore for every proof, I call fetchByProof$(proof) ( https://github.com/numbersprotocol/capture-lite/blob/c485e6d662cc46490cf92a7d25ff5fe3b15fd1aa/src/app/features/home/capture-tab/capture-item/capture-item.component.ts#L75 ) which returns an Asset object and an Asset object that has a property called a caption. Then if asset.caption is not empty show caption icon.
Maybe we can disable captions until we add caption field to Proof object (need James Chien opinion)
Based on the number of users and API requests received by backend API, the app seems to be making excessive amount of API calls. Figure out why and reduce it
┆Issue is synchronized with this Asana task by Unito ┆Created By: Ray Hung