I am trying to test some of my 2.7 python scripts on 3.6 python and i noticed a huge difference on amount of time it takes to run the FeatureClassToFeatureClass_conversion process. so with 3.6 python the process took 18 min 5 secs, with 2.6 python it took only 8 seconds. Does anyone know why the it take much longer in 3.6 Python?
This is what i am using, there is more fields than this i just removed a lot of them.
PT1 <SPAN class="operator token">=</SPAN> <SPAN class="string token">"C:/Temp/Scratchworkspace.gdb/Drain"</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">Layers15</SPAN><SPAN class="punctuation token">(</SPAN>PT1<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
FieldMapString <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN> \
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"PIN "</SPAN>PIN" true true false <SPAN class="number token">13</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,Pin,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"ACRES "</SPAN>ACRES" true true false <SPAN class="number token">4</SPAN> Double <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1+ """,ACRES,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"Instrument "</SPAN>Instrument" true true false <SPAN class="number token">10</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,Instrument,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"SiteAddres "</SPAN>SiteAddres" true true false <SPAN class="number token">106</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,SiteAddres,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"SiteCity "</SPAN>SiteCity" true true false <SPAN class="number token">32</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,SiteCity,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"SiteZip "</SPAN>SiteZip" true true false <SPAN class="number token">10</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,SiteZip,-1,-1;"""\</SPAN>
<SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="string token">"SubName "</SPAN>SubName" true true false <SPAN class="number token">20</SPAN> Text <SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">,</SPAN>First<SPAN class="punctuation token">,</SPAN><SPAN class="comment token">#,""" + PT1 + """,SubName,-1,-1;"""\ </SPAN>
fieldmappings <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>FieldMappings<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
fieldmappings<SPAN class="punctuation token">.</SPAN>loadFromString<SPAN class="punctuation token">(</SPAN>FieldMapString<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">return</SPAN> fieldmappings
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">main</SPAN><SPAN class="punctuation token">(</SPAN>args<SPAN class="operator token">=</SPAN>None<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">if</SPAN> args <SPAN class="keyword token">is</SPAN> None<SPAN class="punctuation token">:</SPAN>
args <SPAN class="operator token">=</SPAN> sys<SPAN class="punctuation token">.</SPAN>argv
<SPAN class="comment token"># Process: Feature Class to Feature Class</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>FeatureClassToFeatureClass_conversion<SPAN class="punctuation token">(</SPAN>PT1<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"C:/Temp/Scratchworkspace.gdb"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"PT_ALL"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN> Layers15<SPAN class="punctuation token">(</SPAN>PT1<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">""</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>