Slow exporting using DDP / Python

2206
3
05-18-2011 07:14 AM
EricHajek1
Occasional Contributor
Hello all,
I'm creating a DDP mapbook of around 90 24x36 maps. I've been using some of the new (at least, to me) tools such as Tiled Labels to Annotation and a python script to export the maps. I keep all the data stored in a single File GDB on my local drive, with the exception of the aerial.

My issue is, when exporting at 300 dpi with "Better" Resample ratio, it's taking around 2 hours for each panel to export. Based on previous experience this seems like way too long. Is this what other people are experiencing?

Random information that hopefully is helpful:
All of my annotation is done using the Tiled Labels to Annotation tool, so for instance I have 20k road labels, but using the DDP Definition Query it's only showing my current panel's road labels. So, there are at least 6 of these definition queries going on for each panel, but there are no more than 400 labels total on even the busiest map, none are feature-linked, and the entire GDB itself is around 125mb, with the majority of that being the county-wide floodplain and roads. The roads are symbologized in two different ways (different data frames) using representations inside the GDB. There are 3 data frames, but two of them are small, aerial-less locator maps.

Here is the python script I've been using to export, it's basically a sample from the help I've modified:
import arcpy
from time import strftime, localtime
mxd = arcpy.mapping.MapDocument(r"C:\Documents and Settings\MXD.mxd")
print  strftime("%d %b %Y %H:%M:%S",localtime()), mxd.filePath, " Loaded Successfully"
pageNameList = ["I4", "I5", "I6", "J5", "H2", "H3", "H4", "F3", "G2", "G3"]
for pageName in pageNameList:
    pageID = mxd.dataDrivenPages.getPageIDFromName(pageName)
    mxd.dataDrivenPages.currentPageID = pageID
    print  strftime("%d %b %Y %H:%M:%S",localtime()), "Printing ", pageName
    mxd.dataDrivenPages.exportToPDF(r"C:\Documents and Settings\Mapbook", "CURRENT", "", "PDF_MULTIPLE_FILES_PAGE_NAME", "300", "BETTER", "RGB", True, "ADAPTIVE", "RASTERIZE_BITMAP", False, True, "NONE", True, 80 )
    print  strftime("%d %b %Y %H:%M:%S",localtime()), pageName, "Printed."
del mxd


Has anyone run into an issue with anything similar? I'm hoping that one particular thing is slowing it down a lot, but any advice about speeding it up in general would be helpful as well.

Thanks,
Eric
0 Kudos
3 Replies
JeffBarrette
Esri Regular Contributor
Eric,

Do you get the same performance exporting to PDF via ArcMap (File--> Export Map...)?

Jeff
0 Kudos
EricHajek1
Occasional Contributor
Hi Jeff,
Yes, it takes around the same amount of time. Sorry, should have specified that originally. If there are any other details you think may be helpful let me know and I'll do my best to fill them in. One random thing I noticed while exporting from ArcMap, is that I don't get many updates on what it is doing in the status bar along the bottom. It seems like normally it will keep updating the user on what it is currently exporting (layer-wise), but that hasn't been the case with this mapbook.

I've tried starting with really low settings (50 dpi, "Fastest"), and then walking them up while turning layers on and off, such as my annotation groups / floodplains, but there doesn't seem to be a big difference with any one thing. I thought it would be the annotation or the semi-transparent polygons, but no such luck.

Thanks,
Eric
0 Kudos
EricHajek1
Occasional Contributor
Quick update for anyone else who has a similar issue in the future:

I did some exporting on a variety of machines, some on XP / win7, some on more or less powerful machines, and the conclusion I came to was that on my usual work machine, the compression aspect of the export process takes more time than the exporting itself. Taking the image compression off of Adaptive and just putting it on None more than halves the amount of time exporting takes. From there, I just "Reduce file size" from within the Adobe PDF program, and it seems to work just as well / takes much less time. I think I'm just below some RAM threshold or something, because the more powerful machines can export in half the time without their page files getting thrashed as pieces of the final export file are saved. (Shocking, I know, that the more powerful computers get it done faster.)

My file sizes went from 30mb to 60mb, but that's still small enough that it's not such a big deal for them to be uncompressed.

Good luck,
Eric
0 Kudos