Web Component takes 30 seconds to get response from API

Hi Koders,

I was building an app using custom API and at first it was working perfect with the Web Component to get API response. But suddenly from last 2 days a issue with web components occurred, and after 2 days of trying to find the root cause and fix it. I am here on the community to seek help from you guys as I am unable to fix anything.

The Web Component take too long ( always around 30 seconds ) to get response from the API where as when i use the same API with all GET parameters on a Web Browser, it gives a quick response.

If anybody can help me out with this problem OR it’s a new bug on Kodular?

Thanks in Advance!

Does anyone have any suggestions??

Help me out

Which API you are using

Any AIA
Or screenshot!!
So to know why it is taking so much time

I already stated that.

it’s Custom API which mean i using a php Admin Panel and connected it to MySQL using APIs

Have you tried to get a response from server manually (without the app)

1 Like

I think you have not read the full post.

Oops sorry

Provide the AIA to figure out the error

The App is a confidential Project. So i can’t provide the whole aia whereas here’s the Blocks ScreenShot.

Try using Postman, to see if it takes as long as your app

1 Like

I have done the same as you suggested and got that for the very first request via PostMan it takes 2.30s to get the reponse. ( which is far better than 30 seconds )

api

How large is the response payload? Could it be that the JSON parser extension you’re using is taking too long?

Can I ask you something about api? Because I started learning with a completely zero foundation, but I have no control over the API. Is anyone willing to demonstrate an aia and explain for me?

I don’t think so as i am using the same extension in many of my projects.

Can u explain this term to me OR how can i check it.

This Topic is not for any guidance you are going off topic if you want to discuss more about the JSON APIs then create a separate topic.

BTW, if you understand Hindi language then this tutorial may help you.

Can you post the size of the response JSON? Make the request using postman and check the size of the response

I think it’'s already covered in the image i uploaded here. The size is : 495 B

to find out what @Vishwas suggested, display the response of the Web.GotText event in a label and deactivate all other blocks temporarily

Taifun

2 Likes

For MySQL php I think u should use MySQL extension made by deep host it is very simple
to use

I did as per your suggestion and found that web component is fetching a quick response.
therefore, it maybe the JSON Extension creating problem.

BUT, the shocking thing to me is that after I Re-Enabled the blocks again. That same blocks work perfectly and instantly.

So what should i do? can I continue my development or should seek for an alternative of JSON Parsing like Kodular Dictionary. ( But the big problem is that if i do so that i am likely going to make the 80% of work again )