Trying to optimize on my front end latency problems and I think that the bottleneck is my internal API calls, wondering if there's any techniques or tools I can use for this?
If the problem is that the payload is super large (like you mentioned below), I would confirm that first with the client-side devtools in Chrome/Firefox/<browser> using the "timing" tab:
If the "waiting" line is the longest bit, then you know your backend is getting hung up some place. If "content download" is the longest, then your data payload is big and taking a long time to download.
For debugging slowness in your backend, I would say add some instrumentation to generate a flame graph of the codepath(s) for a given route that you might be hitting. This will tell you exactly where slowness is and how long each function call is taking. This article has some rails-specific examples that look pretty good.
Use tools like
Microsoft's Application Insights (excellent for .net, free to setup 500mb logs free, 2 eur/gb logs processed after that),
Elastic's APM (bunch of integrations, free to host yourself )
Datadog (cheaper than dynatrace)
dynatrace
Stackify
Hello @hshidara, happy to help! I've developed HowFast (https://www.howfast.tech/) which has an APM (Application Performance Monitoring) feature, basically letting you know how long each of your endpoint takes. Ping me at [email protected] if you want to try it out :)
As mentioned by the others, the Timings tab in the Developers Tool is your friend and will let you understand why a given request is slow, inside your browser (won't work for your users though).
If the problem is that the payload is super large (like you mentioned below), I would confirm that first with the client-side devtools in Chrome/Firefox/<browser> using the "timing" tab:
If the "waiting" line is the longest bit, then you know your backend is getting hung up some place. If "content download" is the longest, then your data payload is big and taking a long time to download.
For debugging slowness in your backend, I would say add some instrumentation to generate a flame graph of the codepath(s) for a given route that you might be hitting. This will tell you exactly where slowness is and how long each function call is taking. This article has some rails-specific examples that look pretty good.
Yo the flame graph is really great, thank you 🙏
Use tools like
Microsoft's Application Insights (excellent for .net, free to setup 500mb logs free, 2 eur/gb logs processed after that),
Elastic's APM (bunch of integrations, free to host yourself )
Datadog (cheaper than dynatrace)
dynatrace
Stackify
Hello @hshidara, happy to help! I've developed HowFast (https://www.howfast.tech/) which has an APM (Application Performance Monitoring) feature, basically letting you know how long each of your endpoint takes. Ping me at [email protected] if you want to try it out :)
As mentioned by the others, the Timings tab in the Developers Tool is your friend and will let you understand why a given request is slow, inside your browser (won't work for your users though).
Looks nice
This comment was deleted 4 years ago.
No caching, but I have 1 main payload on load, which isn't small, might need to break it up into other calls... Using rails and react.
I'll try using Postman to isolate the problems, thank you!
This comment was deleted 4 years ago.