API Calls are too slow
See original GitHub issueHello,
I recently upgraded google-ads-api
to version 5.0.3
hoping to overcome all the problems I had with version 4.0.3
. The GRPC library used by google-ads-api
in version 4.0.3
randomly returned some obscure Stream Removed
error, so as soon as I read that the newer version is using a different GRPC library I was keen on upgrading my codebase to the latest version.
Alas, it turned out that this code:
const customer = new Customer(
clientOptions,
{
customer_id: id || process.env.GOOGLE_ADS_CUSTOMER_ID,
login_customer_id: process.env.GOOGLE_ADS_CUSTOMER_ID,
refresh_token: process.env.GOOGLE_ADS_REFRESH_TOKEN
},
{
onQueryStart({ credentials, query, reportOptions, cancel, editOptions }) {
console.log("q", query)
},
onQueryError({ credentials, query, reportOptions, error }) {
console.log("err", error);
}
}
)
let data = await customer.query('SELECT customer_client.descriptive_name, customer_client.id FROM customer_client')
took about 42 seconds to resolve.
Am I missing something? Why is it so slow?
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Best Practices to avoiding slow API response time
There are a few optimizations that you can do to avoid slow API responses: · Increasing the number of records returned per page...
Read more >Web API call too slow - Stack Overflow
My client complained that the retrieving of data from the web api is very slow. I wonder what's causing this. Here's a basic...
Read more >Analyzing the Causes of Slow API Call Performance
For example, is slow Processing Time the primary cause of slow API call performance in general? After all, it was the outlier curl...
Read more >TechExchange: Strategies for dealing with slow API responses
The time taken by APIs plays a role in the user experience. One of the ways to handle slow API responses is by...
Read more >8 reasons why your API adoption is so slow - TechBeacon
8 reasons why your API adoption is so slow · 1. Documentation has bad design · 2. API provider didn't consider the developer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve taken a further look and there are some issues around the
GoogleAdsService
being very slow to initialise, as it requires all other protos within it. See my reply here as well.We’re also going to raise the issue with Google.
Glad to hear you have a temporary solution @flasaracina.
You bring up the interesting point about the REST API being much quicker, and it’s something we’ve thought about before. We’ve been quite pro proto/gRPC as Google recommends it and claim that it’s faster, but this hasn’t been the case always, particularly with the new Gapic auto-generated clients.
It could be interesting to think about using REST behind the scenes instead of gRPC in a future major version.