Select to view content in your preferred language

Even simple scripts take 20+ mins to Publish?

238
4
11-07-2024 07:32 AM
DougBrowning
MVP Esteemed Contributor

Any tips to speed up publishing?  I thought it was my 3,000 line script but now even ones under 100 lines take 20-45 minutes or more!  It is a decent size server and I am local to it.  Not copying any data or anything.  I know some of it is it repathing my vars - which I really, really wish we could turn that off!  It breaks up SQL queries, does not allow URLs to services for some odd reason, and creates other mayhem.  

Its just getting hard to get work done when every small change takes so long to publish.

Pro 3.1 and Server 11.3.

Thanks

4 Replies
ChrisUnderwood
Esri Contributor

Hello @DougBrowning , I believe this is a simple as a Geoprocessing tool script can be. How long does it take to Publish for you ?

#MINIMAL SCRIPT

import arcpy

arcpy.AddMessage("Hello World !!!")

0 Kudos
DougBrowning
MVP Esteemed Contributor

Finally got to test this simple script above and it published quickly @ChrisUnderwood .

So why is it taking 20 mins to an hour then?  Is it all the repathing?  (Is their anyway to turn it off it has not worked correctly for years now).  Even is that is it no way it should take that long on 100 lines of code.

It is not even editing the server file for that 20 mins so it does seem stuck on the repathing part.

It is repathing some weird stuff that are just layers in memory.

g_ESRI_variable_1 = '\\\\netparh\\T_AllIndicators.crf'
g_ESRI_variable_2 = '\\\\netpath\\Rastermap.aprx'
g_ESRI_variable_3 = 'yearsRaster'
g_ESRI_variable_4 = 'TrendRaster_pval'
g_ESRI_variable_5 = 'TrendRaster_pval2'
g_ESRI_variable_6 = 'VALUE < 0.05'
g_ESRI_variable_7 = 'TrendRaster_sens'

Any help is greatly appreciated.  4 days of every little change taking this long is driving me nuts.

thanks

0 Kudos
DougBrowning
MVP Esteemed Contributor

I got access to edit on the server now.  If I comment out the code and publish it takes less than a minute.  Then I go in and uncomment out the script server side.  This is a trick we have had to use for years now.  Something is wrong with the repathing part of publishing.  Still 20+ minutes each time.  Overwrite fails every other time. 

What would cause such a lag?  I can send script if needed.  @ChrisUnderwood 

0 Kudos
ChrisUnderwood
Esri Contributor

Hello @DougBrowning , sorry I don't know why that would be so slow. But I think we have clarified the question enough for you to now open a support case for a more detailed investigation.

0 Kudos