Re: BatchJob runtime performance issue

2017-03-27 Thread dima
Thank you!

On Monday, March 27, 2017 at 9:47:21 PM UTC+3, Michael Cloonan (AdWords API 
Team) wrote:
>
> Hello,
>
> The team has determined that the issues at this time were transient and 
> that everything should be going smoothly again now. I apologize for the 
> inconvenience.
>
> Please make a new thread if the slowdowns occur again so that we can 
> investigate!
>
> Regards,
> Mike, AdWords API Team
>
> On Monday, March 13, 2017 at 1:22:58 PM UTC-4, Michael Cloonan (AdWords 
> API Team) wrote:
>>
>> Hello,
>>
>> There are no particular performance guidelines or guarantees I can share 
>> with you. The team is currently looking into why the BatchJobService may be 
>> performing slower than expected, and I will let you know when I have any 
>> more information.
>>
>> Regards,
>> Mike, AdWords API Team
>>
>> On Monday, March 13, 2017 at 12:02:57 PM UTC-4, di...@easyleads.com 
>>  wrote:
>>>
>>> Great.
>>>
>>> Is there "rule of thumb" on number of operations that is better to 
>>> execute directly via the service?
>>>
>>> Thank you!
>>>
>>> On Monday, March 13, 2017 at 5:55:18 PM UTC+2, Vishal Vinayak (Adwords 
>>> API Team) wrote:

 Hi,

 In case you need only a few operations per customer, you can send the 
 operations directly via the service (rather than using BatchJobService). 
 Meanwhile, I'll check with my team on why the performance has been slow 
 for 
 the last few weeks. Myself or someone from my team would get back to you 
 on 
 this thread. 

 Regards,
 Vishal, AdWords API Team

>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/02812d89-469f-41ef-b577-b909a4c8a3f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-27 Thread 'Michael Cloonan (AdWords API Team)' via AdWords API Forum
Hello,

The team has determined that the issues at this time were transient and 
that everything should be going smoothly again now. I apologize for the 
inconvenience.

Please make a new thread if the slowdowns occur again so that we can 
investigate!

Regards,
Mike, AdWords API Team

On Monday, March 13, 2017 at 1:22:58 PM UTC-4, Michael Cloonan (AdWords API 
Team) wrote:
>
> Hello,
>
> There are no particular performance guidelines or guarantees I can share 
> with you. The team is currently looking into why the BatchJobService may be 
> performing slower than expected, and I will let you know when I have any 
> more information.
>
> Regards,
> Mike, AdWords API Team
>
> On Monday, March 13, 2017 at 12:02:57 PM UTC-4, d...@easyleads.com wrote:
>>
>> Great.
>>
>> Is there "rule of thumb" on number of operations that is better to 
>> execute directly via the service?
>>
>> Thank you!
>>
>> On Monday, March 13, 2017 at 5:55:18 PM UTC+2, Vishal Vinayak (Adwords 
>> API Team) wrote:
>>>
>>> Hi,
>>>
>>> In case you need only a few operations per customer, you can send the 
>>> operations directly via the service (rather than using BatchJobService). 
>>> Meanwhile, I'll check with my team on why the performance has been slow for 
>>> the last few weeks. Myself or someone from my team would get back to you on 
>>> this thread. 
>>>
>>> Regards,
>>> Vishal, AdWords API Team
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/48d24fd5-41eb-4d10-b519-6ec8153ef3fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-13 Thread 'Michael Cloonan (AdWords API Team)' via AdWords API Forum
Hello,

There are no particular performance guidelines or guarantees I can share 
with you. The team is currently looking into why the BatchJobService may be 
performing slower than expected, and I will let you know when I have any 
more information.

Regards,
Mike, AdWords API Team

On Monday, March 13, 2017 at 12:02:57 PM UTC-4, d...@easyleads.com wrote:
>
> Great.
>
> Is there "rule of thumb" on number of operations that is better to execute 
> directly via the service?
>
> Thank you!
>
> On Monday, March 13, 2017 at 5:55:18 PM UTC+2, Vishal Vinayak (Adwords API 
> Team) wrote:
>>
>> Hi,
>>
>> In case you need only a few operations per customer, you can send the 
>> operations directly via the service (rather than using BatchJobService). 
>> Meanwhile, I'll check with my team on why the performance has been slow for 
>> the last few weeks. Myself or someone from my team would get back to you on 
>> this thread. 
>>
>> Regards,
>> Vishal, AdWords API Team
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/35b20e4d-3ae1-4511-a2e1-2c60d65abf52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-13 Thread dima
Great.

Is there "rule of thumb" on number of operations that is better to execute 
directly via the service?

Thank you!

On Monday, March 13, 2017 at 5:55:18 PM UTC+2, Vishal Vinayak (Adwords API 
Team) wrote:
>
> Hi,
>
> In case you need only a few operations per customer, you can send the 
> operations directly via the service (rather than using BatchJobService). 
> Meanwhile, I'll check with my team on why the performance has been slow for 
> the last few weeks. Myself or someone from my team would get back to you on 
> this thread. 
>
> Regards,
> Vishal, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b7fbe1b5-19c5-4239-9256-7f0acd8e9182%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-13 Thread 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
Hi,

In case you need only a few operations per customer, you can send the 
operations directly via the service (rather than using BatchJobService). 
Meanwhile, I'll check with my team on why the performance has been slow for 
the last few weeks. Myself or someone from my team would get back to you on 
this thread. 

Regards,
Vishal, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ef231099-ad4d-42d3-8d0d-3fbab59b83ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-13 Thread dima
Hi,

I group operations of the same customer. The problem is that we manage 
hundreds of customers and as far as I know I can't group their operations 
in one job (because I can't specify multiple customers/credentials in the 
session).

But the real problem is that there is a severe degradation during past 
weeks. This logic runs for months and the problem began 2-3 weeks ago.

On Monday, March 13, 2017 at 4:31:04 PM UTC+2, Vishal Vinayak (Adwords API 
Team) wrote:
>
> Hi,
>
> Batch jobs usually do not take a long time to complete when there are only 
> a few operations in the request. However, fewer larger jobs are preferred 
> over many smaller jobs and you might have faced intermittent delays when 
> sending too many smaller jobs in a short interval of time. Could you please 
> check if some of these operations can be grouped in a single job? If there 
> are dependent operations, you can use temporary IDs to reference to the 
> result of an ADD operation that precedes a given operation. 
>
> Regards,
> Vishal, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d38fd4b8-f242-4aef-ac67-94a99d025a9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-13 Thread 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
Hi,

Batch jobs usually do not take a long time to complete when there are only 
a few operations in the request. However, fewer larger jobs are preferred 
over many smaller jobs and you might have faced intermittent delays when 
sending too many smaller jobs in a short interval of time. Could you please 
check if some of these operations can be grouped in a single job? If there 
are dependent operations, you can use temporary IDs to reference to the 
result of an ADD operation that precedes a given operation. 

Regards,
Vishal, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d684fa87-0459-452b-9ec9-91c1ceab7a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-12 Thread dima
Hi,

Sorry for the delay.

All jobs succeed, but some of them take a lot of time. These jobs are from 
last two hours (size is number of operations in job). I understand that due 
to sleep actual time may be less (for example 300 seconds instead of 500), 
but it's still seems for me too long.
job_id
size
duration (sec)
463701054
1
1088
463504394
1
1081
463506035
7
1078
463504838
3
1074
463499033
1
1063
463526266
3
1063
463501124
14
1054
463695663
3
1047
463695669
3
1047
463515697
5
1044
463689093
2
1026
463516076
3
562
463709946
2
556
463492631
3
552
463696620
1
546
463526995
2
543
463493558
1
528
463518640
3
526
463695759
4
523
463529416
4
513

Thanks

On Monday, March 6, 2017 at 8:38:06 PM UTC+2, Vishal Vinayak (Adwords API 
Team) wrote:
>
> Hi,
>
> The code that you shared looks correct. There might be an intermittent 
> issue with performance of the batch jobs which might have caused delays on 
> your side. Could you please confirm if you saw any batch job failures? If 
> you are still facing issues, please let me know and I would dig deeper into 
> this issue. Meanwhile, you can check out this Best Practices Guide 
> 
>  to 
> optimize your batch job.
>
> Regards,
> Vishal, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5d7e0412-a9a1-4133-893c-af90b334aaed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-06 Thread 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
Hi,

The code that you shared looks correct. There might be an intermittent 
issue with performance of the batch jobs which might have caused delays on 
your side. Could you please confirm if you saw any batch job failures? If 
you are still facing issues, please let me know and I would dig deeper into 
this issue. Meanwhile, you can check out this Best Practices Guide 

 to 
optimize your batch job.

Regards,
Vishal, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4f69420d-ba04-4b0a-b66e-7e4c55680d6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BatchJob runtime performance issue

2017-03-06 Thread dima
Another job, running right now:
Sleeping 2 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 4 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 8 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 16 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 32 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 64 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 128 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 256 seconds...
Batch job ID 455533540 has status 'ACTIVE'.
Sleeping 512 seconds...

On Monday, March 6, 2017 at 12:39:42 PM UTC+2, di...@easyleads.com wrote:
>
> Hi,
>
> Our software manages customers budgets and as result it performs a lot of 
> BudgetOperations, thus the performance is critical.
>
> I just had a job that updates budgets/delivery methods of 15 campaigns and 
> it took several minutes.
>
> Am I doing something wrong?
>
> Thanks
>
> Job ID is 455295008
>
> Output:
> Sleeping 2 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 4 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 8 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 16 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 32 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 64 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 128 seconds...
> Batch job ID 455295008 has status 'ACTIVE'.
> Sleeping 256 seconds...
> Batch job ID 455295008 has status 'DONE'.
>
> Code:
> BatchJobServiceInterface batchJobService = adwordsServices.get(session, 
> BatchJobServiceInterface.class);
> // Create a BatchJob.
> BatchJobOperation addOp = new BatchJobOperation();
> addOp.setOperator(Operator.ADD);
> addOp.setOperand(new BatchJob());
> BatchJob batchJob = batchJobService.mutate(new BatchJobOperation[] 
> {addOp}).getValue(0);
> // Get the upload URL from the new job.
> String uploadUrl = batchJob.getUploadUrl().getUrl();
>
> // Use a BatchJobHelper to upload all operations.
> BatchJobHelper batchJobHelper = new BatchJobHelper(session);
>
> batchJobHelper.uploadBatchJobOperations(operations, uploadUrl);
>
> List pendingStatuses = 
> Arrays.asList(BatchJobStatus.ACTIVE, BatchJobStatus.AWAITING_FILE);
> int pollAttempts = 0;
> boolean isPending = true;
> Selector selector = new SelectorBuilder().
> fields(BatchJobField.Id, BatchJobField.Status, BatchJobField.DownloadUrl, 
> BatchJobField.ProcessingErrors, BatchJobField.ProgressStats)
> .equalsId(batchJob.getId())
> .build();
> int initialWait = 2;
> if(operations.size() > 100){
> if(operations.size() < 200){
> initialWait = 4;
> }
> else if(operations.size() < 500){
> initialWait = 6;
> }
> else{
> initialWait = 10;
> }
> }
>
> do {
> long sleepSeconds = (long)(Math.scalb(initialWait, pollAttempts));
> System.out.printf("Sleeping %d seconds...%n", sleepSeconds);
> Thread.sleep(sleepSeconds * 1000);
>
> batchJob = batchJobService.get(selector).getEntries(0);
> System.out.printf("Batch job ID %d has status '%s'.%n", batchJob.getId(), 
> batchJob.getStatus());
>
> pollAttempts++;
> isPending = pendingStatuses.contains(batchJob.getStatus());
> } while (isPending && pollAttempts < 10);
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d55b4e60-0061-4be8-9f8e-a62a0af9629d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BatchJob runtime performance issue

2017-03-06 Thread dima
Hi,

Our software manages customers budgets and as result it performs a lot of 
BudgetOperations, thus the performance is critical.

I just had a job that updates budgets/delivery methods of 15 campaigns and 
it took several minutes.

Am I doing something wrong?

Thanks

Job ID is 455295008

Output:
Sleeping 2 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 4 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 8 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 16 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 32 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 64 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 128 seconds...
Batch job ID 455295008 has status 'ACTIVE'.
Sleeping 256 seconds...
Batch job ID 455295008 has status 'DONE'.

Code:
BatchJobServiceInterface batchJobService = adwordsServices.get(session, 
BatchJobServiceInterface.class);
// Create a BatchJob.
BatchJobOperation addOp = new BatchJobOperation();
addOp.setOperator(Operator.ADD);
addOp.setOperand(new BatchJob());
BatchJob batchJob = batchJobService.mutate(new BatchJobOperation[] 
{addOp}).getValue(0);
// Get the upload URL from the new job.
String uploadUrl = batchJob.getUploadUrl().getUrl();

// Use a BatchJobHelper to upload all operations.
BatchJobHelper batchJobHelper = new BatchJobHelper(session);

batchJobHelper.uploadBatchJobOperations(operations, uploadUrl);

List pendingStatuses = Arrays.asList(BatchJobStatus.ACTIVE, 
BatchJobStatus.AWAITING_FILE);
int pollAttempts = 0;
boolean isPending = true;
Selector selector = new SelectorBuilder().
fields(BatchJobField.Id, BatchJobField.Status, BatchJobField.DownloadUrl, 
BatchJobField.ProcessingErrors, BatchJobField.ProgressStats)
.equalsId(batchJob.getId())
.build();
int initialWait = 2;
if(operations.size() > 100){
if(operations.size() < 200){
initialWait = 4;
}
else if(operations.size() < 500){
initialWait = 6;
}
else{
initialWait = 10;
}
}

do {
long sleepSeconds = (long)(Math.scalb(initialWait, pollAttempts));
System.out.printf("Sleeping %d seconds...%n", sleepSeconds);
Thread.sleep(sleepSeconds * 1000);

batchJob = batchJobService.get(selector).getEntries(0);
System.out.printf("Batch job ID %d has status '%s'.%n", batchJob.getId(), 
batchJob.getStatus());

pollAttempts++;
isPending = pendingStatuses.contains(batchJob.getStatus());
} while (isPending && pollAttempts < 10);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1e84f5b8-1be8-4281-ac2e-9a8bcf5ce272%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.