I am producing 1,500 PDF maps and was wondering what changes I can make to either my machine or to ArcMap to help speed things along. Currently, it takes 5:45 - 6 minutes to produce four maps. If I change the output format to PNG, this goes down to 1:46 minutes, but I need to output PDFs.

My specs are: -one geodatabase -20 or so different feature classes -python script to cycle through 30 different layers for all 50 states -running on local machine -ArcMap 10.6.1

What I've tried: -clearing cache in ArcMap -rebooting machine -enabling hardware acceleration and background processing -attribute indexes on query fields -spatial indexes added -ArcGIS cache manager declared high priority in Windows Task Manager

Any suggestions/tips that I can try to speed this up?

  • Are the geodatabase and the output PDFs both stored on the local machine? Sounds like it. If they're on a mechanical HDD, is installing an SSD an option? – Dan C Aug 10 at 16:35
  • Both stored on a local machine. Installing an SSD may be a possibility, but haven't escalated to that point yet. Unless other options don't work, maybe i'll try it. – Dave Aug 10 at 16:42
  • You might fiddle with your settings in the pdf export dialog box tabs, such as output quality, dpi, attribute information, etc. and add what you have tried to your question. There is a File - Analyze menu option that might provide some useful info to you. – johns Aug 10 at 16:45
  • Have you tried lowering the pdf quality as much as you can accept, dpi, compression etc.? You can also try clipping the data and remove all layers that are not used since it will "draw" all data, even outside the display extent. – BERA Aug 10 at 18:29
  • Do you really need PDFs because of their end features (measuring if geo-enabled, layers control, Illustrator conversion)? If not, high resolution graphics files can be converted to PDF, multipage too, pretty easily. Plus, you could turn off layer support, attribute support, and geo to make exports go somewhat faster. But, I am used to much longer export times than yours. – danak Aug 10 at 18:44

This script took 38 seconds to export 100 pages:

import time, os
import multiprocessing
from multiprocessing import Pool
import arcpy
t0 = time.time()
def ddpExport(i):
    outFolder=r'f:\AERIALS\PDFs'
    mxd = arcpy.mapping.MapDocument(r"C:\TOOLS\_wbench.mxd")
    ddp = mxd.dataDrivenPages
    fromPage=10*i+1
    toPage=fromPage+10
    for pageID in range(fromPage,toPage):
        ddp.currentPageID = pageID
        code='PAGE_%s' %str(pageID).zfill(5)
        fName='%s%s%s.pdf' %(outFolder,os.sep,code)
        arcpy.mapping.ExportToPDF(mxd,fName,"PAGE_LAYOUT", resolution =72)
    return '%s-%s' %(fromPage,toPage-1)
if __name__ == "__main__":
    p = Pool(4)
    aList=list(range(10))
    print(p.map(ddpExport, aList))
    print ('%i seconds' %(time.time()-t0))

vs 95 seconds from mxd itself. Yes, it will take 10-15 seconds to load arcpy, but overall you should expect significant time saving, when using multiprocessing for that task. See help on how to reduce size as well, e.g. set layers_attributes = "NONE". No improvements found when exporting to SSD, but the job was too small.

UPDATE THAT WORKS EVEN FASTER:

import time, os
import multiprocessing
from multiprocessing import Pool
import arcpy
t0 = time.time()
def ddpExport(i):
    outFolder=r'c:\SCRATCH\BACKUP'
    mxd = arcpy.mapping.MapDocument(r"C:\TOOLS\_wbench.mxd")
    ddp = mxd.dataDrivenPages
    fromPage=10*i+1
    toPage=fromPage+10
    fName='%s%sPages_%s.pdf' %(outFolder,os.sep,str(i+1).zfill(3))
    ddp.exportToPDF(fName,"RANGE", '%s-%s' %(fromPage,toPage-1),
                                  resolution =72,
                                  embed_fonts="False",
                                  layers_attributes="NONE")
    return '%s-%s' %(fromPage,toPage-1)
if __name__ == "__main__":
    p = Pool(5)
    aList=list(range(10))
    print(p.map(ddpExport, aList))
    print ('%i seconds' %(time.time()-t0))

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.