I published a GP service to ArcGIS server. I found that the operation speed is extermely slow because of the function ListDataFrames. To define a dataframe object with respect to my mxd, it spended 3 mins. Actually, I do not need to change the dataframe in my operation. Therefore, it wastes the time on defining the dataframe object when the GP service is called each time.
Is any method to define the dataframe object and keep it alive in my GP service so that dataframe will not be defined each time when the GP service is called? (i.e. dataframe is defined when GP service is set up and destoryed when GP service is stopped).
I am not sure whether arcpy contains function for defining some globel objects for GP service operation or not. If no, SOE (server object extensions) can do so?