Renaming layers in MXD takes a long time

400
2
06-02-2011 06:33 PM
ChrisJarvis
New Contributor
One of our users has found that renaming a layer in an open MXD takes 1-3 minutes. He feels that the process should be instantaneous.

ArcGIS was originally running in a 32-bit (Windows XP) virtual machine (VMWare) running on top of a Linux workstation (RHEL 4.8, 64-bit). The user was given a physical PC (Windows XP, 32 bit) to use and found that renaming the layer was faster (~30 seconds), but not up to expectations.

The MXD file is ~1.3MB in size and resides on a shared network drive (the performance of the file server is not an issue).

How long should renaming a layer take? Are there any known bottlenecks for this process?
0 Kudos
2 Replies
KimOllivier
Occasional Contributor III
Renaming a layer in the current MXD should be instantaneous. After all the MXD will be in memory.
This took 312 milliseconds.

I think that having things on a network will be the likely culprit. It could be a very slow licence manager lookup causing the delay. Try a ping and other network analysis tools.

I am amazed at the lengths people go to to avoid a simple local machine running Windows with local disks. They surely are a commodity? This is the only way I run processes for GIS analysis.
Anything else is asking for much delay, even network calls are not optimised in any system, they simulate a local disk call, but are very slow across a network. Nothing to do with the network drives, its the OS and the network disconnection.

Here is a benchmark script. I ran this in the Python window.
>>> # rename layer
... import arcpy
... import datetime
... start = datetime.datetime.now()
... mxd = arcpy.mapping.MapDocument("CURRENT")
... lstDF = arcpy.mapping.ListDataFrames(mxd)
... print len(lstDF),"frames"
... for df in lstDF:
...     print df.name
...     llay = arcpy.mapping.ListLayers(mxd,"",df)
...     for lay in llay:
...         print lay.name
...         print mxd.title,df.name,lay.name
...         lay.name = lay.name+"changed"
... arcpy.RefreshActiveView()
... arcpy.RefreshTOC()
... print datetime.datetime.now() - start
... 
2   frames

Layers

pointerchanged

topo250   Layers   pointerchanged

coastlinechanged

topo250   Layers   coastlinechanged

lakechanged

topo250   Layers   lakechanged

native_polychanged

topo250   Layers   native_polychanged

island_polychanged

topo250   Layers   island_polychanged

mainlandchanged

topo250   Layers   mainlandchanged

index250changed

topo250   Layers   index250changed

Index

coastlinechanged

topo250   Index   coastlinechanged

sheetchanged

topo250   Index   sheetchanged

index250changed

topo250   Index   index250changed

0:00:00.312000
0 Kudos
ChrisJarvis
New Contributor
Thanks for your input Kim.

Our users are here in Australia and our license server is in the US (~250ms ping times). This is probably the greater source of the performance issue.

Our users need their Linux workstations for the primary GGRE applications that they run. A PC is a secondary concern (for email, word processing, etc), so the corporate policy is to give everyone a VM...
0 Kudos