Python script to launch ArcMap and log startup time

421
2
02-04-2020 05:53 AM
Bartvan_der_Wolf
New Contributor II

Dear All,

We are still on arcmap 10.3.1. and now we migrate from Windows 7 to Windows 10. Users who already migrated experience severe performance issues.

What i'm trying to achieve is to log ArcMap startup time as an indicator of user-performance.

I tried to start ArcMap from python and that works even launching a blank MXD.

What doesn't work is the measure for t2. The script walks on while ArcMap is loading.

Does anyone see how this could be achieved? I thought maybe the is a way to lauch arcmap and running a script which would write a timestamp to a file...

Or should I forget this Idea and just use a stopwatch?
Thanks..

import os, time

blank = r'P:\civ\Geo-Projecten_PT\HotFIX_KG\10.3.1_bwTools\_Proj\performance2020\Blank.mxd'
tfm = '%H:%M:%S'
t1 = time.time()
st1 = time.strftime(tfm)
print 'start-time      : ' + st1
os.startfile(blank)
t2  = time.time()
st2 = time.strftime(tfm)
print 'time loaded     : ' + st2
print 'ArcMap load-time: ' + str(round((t2-t1),1))
print '----------------------'
print '-----Script end!------'

Tags (1)
0 Kudos
2 Replies
RobertBorchert
Frequent Contributor III

Using a stopwatch might be just as effective as neither will tell you why your startup is slow.

We upgraded to Windows 10 early last year and startup times increased for us. 

Question:  Did you upgrade to Windows 10 or get new computers with Windows 10 and installed ArcMap?

When we upgraded we received new computers with the generic company image loaded on the drive.  We also upgraded to SSD.

We then had to install ArcMap on the new Windows machine.  If you upgraded your computers to Windows 10 you might be well served by removing and re-installing ArcMap.  You may very well be experiencing issues with License Manager or an install configured for W7 not being compatible with W10

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Application profiling is an involved topic, one that is difficult to casually dive into whether using Esri or other companies' products.

I am unclear whether your issue/question is about starting ArcMap or opening MXDs.  If someone is clicking on an MXD to open it, there are two (or more) very distinct actions happening.  Is ArcMap really opening slowly or is it loading MXDs into ArcMap that are slow?

0 Kudos