We’re implementing Amity Follow on our web.
We want to show whole following lists on the sidebar.
And there’s another seciton called Suggested Creator which we’ll need to pass whole following lists to our api for not showing creator that user is following on this section.
registerSession normally takes less than 500ms to complete - so the duration you shared isn’t normal. Can you help share the code where you’re calling and logging to console?
You also shouldn’t be using getFollowInfo unless you’re particularly checking for follow status of a user?
You also shouldn’t be using getFollowInfo unless you’re particularly checking for follow status of a user?
We’re checking for follow status for each suggested creator. When user click on follow button, then the status on the button should change to following.
From your HAR packet registerSession is completed within around 200 ms + another 1 second to establish websocket connection, which looks normal.
However I do see that you’re calling 21 calls at the same time after that to get follow info of each person’s relationship - and another batch right after. This could be something that will slow your response down + will be at risk of hitting rate limit – you may need to throttle this down while showing less users on the suggestion list.
Another suggestion would be to do a lazy loading and put in spinner while each follow info is loading
@touchaponk We made some changes into our code. We managed to remove the unnecessary followInfo calls.
However, the problem mentioned in my previous comment is still a mystery. When user clicks Follow button, it takes about 3-4 seconds before SDK responds. I see the same slowness when I call the follow API endpoint using Postman.
Are these response times normal? Is there something that could be done to make the API respond faster? I have a memory that the API was working much faster about 1-2 months ago.