Select to view content in your preferred language

Excessive time consumption to execute a geoprocessing package with Local Server

657
3
09-22-2023 12:14 AM
AlexanderZhang
Occasional Contributor

Hi, all

I use ArcGIS Runtime Local Server(200.1) and ArcGIS Maps SDK for .Net(200.2). As the title says, i created a geoprocessing package (.gpkx) in ArcGIS Pro(3.02) involving a custom geoprocessing script tool, and executed it with Local Server, it spent too much time waiting to get results(it takes about 6 seconds). I made many attempts to reduce time consumption, but with no success, i encountered the following situation that made me wonder:

1.If the time-consuming of executing the geoprocessing package is less than 1 second, it needs to wait about 1.1 seconds to get the result.

2.If the time-consuming of executing the geoprocessing package is more than 1 second(such as 1.35 second), it needs to wait about 6.1 seconds to get the result. why?

For the second situation, the job's Message shows as follows :

Job's MessagesJob's Messages

Can some help me please? thanks

0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor

I think there may be built in logic to avoid continually polling the service to check if it's done, but 6 seconds sounds suspicious for a job that you say takes just over 1 second to complete.

 

Can you share the code you're using to execute the GP job and also for timing?

0 Kudos
AlexanderZhang
Occasional Contributor

Thank you @MichaelBranscomb for your  quick reply, i will show you the code executing the GP  job next monday, i didn't write code to calculate time-consuming, i just observed the time taken by setting breakpoints in VS2022. Also, there is some information provided in the photo I attached above, the last line shows that it took 1.35 seconds to execute the package, the seventh and fourth-to-last rows show when the job starts and  is completed, respectively.

 

Thanks

0 Kudos
AlexanderZhang
Occasional Contributor

Hi, @MichaelBranscomb , i have sent the relevant code to  your email and am looking forward to your reply.

Thanks.

0 Kudos