Hi! 
The main problem for me  was in the dataframe. But the line row = row._pb  
really helps to reduce the time  for the loop  *for row in results* - on 
large uploads. Thank you! 

понедельник, 12 июля 2021 г. в 22:49:51 UTC+3, adsapi: 

> Hi there,
>
> Thank you for reaching out to Google Ads API.
>
> If you are using the Python client library version 10.0.0 or higher this 
> version contains some known performance bottlenecks that occur when 
> accessing fields on a deserialized protobuf message, which can be 
> especially problematic when processing extremely large responses.
>
> There is a workaround. Our documentation of native versus wrapped 
> protobuf message instances 
> <https://developers.google.com/google-ads/api/docs/client-libs/python/library-version-10>
>  shows 
> how the wrapped protobuf messages include a number of interface 
> improvements, but are slower to retrieve values, whereas the native message 
> instances don't suffer from this problem.
>
> In your example below, if you make the below change, you should see a 
> noticeable performance improvement:
>   
>
>
> for row in results:
>     row = row._pb # This converts the row to its native instance.
>     campaign = row.campaign
>     ad_group = row.ad_group
>     ad_group_ad  = row.ad_group_ad
>
>
> Please let me know if that works for you, or if you have any further 
> questions.
>
> Regards,
>
> [image: Google Logo] 
> Aryeh Baker 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2JZchY:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6ba8aa4d-90d7-4a5b-a430-9ddfbd0159efn%40googlegroups.com.

Reply via email to