<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>I concur with David:</p>
    <p>pkorir@pkorir-tarakimu:trunk $ time python -c 'import vtk'<br>
      <br>
      real    0m1.839s<br>
      user    0m0.336s<br>
      sys    0m0.127s<br>
      pkorir@pkorir-tarakimu:trunk $ time python -c 'import vtk'<br>
      <br>
      real    0m0.458s<br>
      user    0m0.331s<br>
      sys    0m0.104s</p>
    <p><br>
    </p>
    <p>Macbook Pro late 2013<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 18/08/2016 07:12, David Gobbi wrote:<br>
    </div>
    <blockquote
cite="mid:CANwS1=F3RUTivyDPJaBPiQu6uiYxzi0NwO3fg_Hiqz23gh7+_A@mail.gmail.com"
      type="cite">
      <div dir="ltr">YMMV, but on my ancient 2009 MacBook Pro, 2 cores,
        2.53GHz, 4GB RAM, here is the time to execute "import vtk":
        <div><br>
        </div>
        <div>
          <div>$ time bin/vtkpython import_vtk.py</div>
          <div>real<span class="" style="white-space:pre">      </span>0m1.851s</div>
          <div>user<span class="" style="white-space:pre">      </span>0m0.640s</div>
          <div>sys<span class="" style="white-space:pre">       </span>0m0.448s</div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra">And on the second try (when the libs
            are in disk cache):</div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra">
            <div class="gmail_extra">$ time bin/vtkpython import_vtk.py</div>
            <div class="gmail_extra">real<span class="" style="white-space:pre">      </span>0m0.612s</div>
            <div class="gmail_extra">user<span class="" style="white-space:pre">      </span>0m0.485s</div>
            <div class="gmail_extra">sys<span class="" style="white-space:pre">       </span>0m0.120s</div>
            <div class="gmail_extra"><br>
            </div>
            <div class="gmail_extra">So if my system takes 0.6s to
              import VTK, while yours takes 7s, that suggests that
              something funny is going on. Does anyone else want to
              chime in with their experience with loading VTK into
              Python?</div>
            <div class="gmail_extra"><br>
            </div>
            <div class="gmail_extra"> - David</div>
          </div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Wed, Aug 17, 2016 at 9:17 AM,
              Andrea Gavana <span dir="ltr"><<a
                  moz-do-not-send="true"
                  href="mailto:andrea.gavana@gmail.com" target="_blank">andrea.gavana@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr"><span style="font-size:12.8px">Hello,</span>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">     I have recently
                    installed VTK 7.0 to be used via Python 2.7 using
                    the excellent resources from Christoph Gohlke (<a
                      moz-do-not-send="true"
                      href="http://www.lfd.uci.edu/%7Egohlke/pythonlibs/"
                      target="_blank">http://www.lfd.uci.edu/~gohlk<wbr>e/pythonlibs/</a>).
                    I have a considerably powerful machine at work - 96
                    GB RAM, 8 cores, 64 bit Windows 7 Enterprise.
                    However, executing the simple command below:</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">import vtk</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">takes more than 7
                    seconds on this machine. I understand that there are
                    quite a few modules to import in the VTK hierarchy,
                    but I was not expecting such a dramatically slow
                    operation. I also understand that this may not be
                    the perfect forum to post such a question, but maybe
                    someone else has encountered a similar behavior and
                    he/she has some explanation for it.</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">Any suggestion is more
                    than welcome, thank you in advance. I paste below
                    the results of profiling the simple import statement
                    using the Python profiler in this way:</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">python -m cProfile
                    test_import_vtk.py</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px">Andrea.</div>
                  <div style="font-size:12.8px"><br>
                  </div>
                  <div style="font-size:12.8px"><font face="monospace,
                      monospace"><br>
                    </font></div>
                  <div style="font-size:12.8px">
                    <div><font face="monospace, monospace"><b>File Name
                                                     Import Time
                          (seconds)</b></font></div>
                    <div><font face="monospace, monospace">vtkIOImage.py
                                               0.190</font></div>
                    <div><font face="monospace, monospace">vtkIOExodus.py
                                              0.151</font></div>
                    <div><font face="monospace, monospace">vtkCommonCore.py
                                            0.147</font></div>
                    <div><font face="monospace, monospace">vtkRenderingOpenGL2.py
                                      0.124</font></div>
                    <div><font face="monospace, monospace">vtkRenderingFreeType.py
                                     0.120</font></div>
                    <div><font face="monospace, monospace">vtkIOInfovis.py
                                             0.113</font></div>
                    <div><font face="monospace, monospace">vtkIOParallel.py
                                            0.106</font></div>
                    <div><font face="monospace, monospace">vtkIONetCDF.py
                                              0.103</font></div>
                    <div><font face="monospace, monospace">vtkCommonColor.py
                                           0.102</font></div>
                    <div><font face="monospace, monospace">vtkFiltersStatistics.py
                                     0.101</font></div>
                    <div><font face="monospace, monospace">vtkFiltersVerdict.py
                                        0.100</font></div>
                    <div><font face="monospace, monospace">vtkGeovisCore.py
                                            0.100</font></div>
                    <div><font face="monospace, monospace">vtkIOAMR.py  
                                               0.100</font></div>
                    <div><font face="monospace, monospace">vtkIOXMLParser.py
                                           0.099</font></div>
                    <div><font face="monospace, monospace">vtkIOMovie.py
                                               0.097</font></div>
                    <div><font face="monospace, monospace">vtkCommonDataModel.py
                                       0.096</font></div>
                    <div><font face="monospace, monospace">vtkCommonMath.py
                                            0.091</font></div>
                    <div><font face="monospace, monospace">vtkCommonMisc.py
                                            0.091</font></div>
                    <div><font face="monospace, monospace">vtkInteractionWidgets.py
                                    0.091</font></div>
                    <div><font face="monospace, monospace">vtkRenderingVolume.py
                                       0.090</font></div>
                    <div><font face="monospace, monospace">vtkCommonComputationalGeometry<wbr>.py
                           0.088</font></div>
                    <div><font face="monospace, monospace">vtkFiltersModeling.py
                                       0.087</font></div>
                    <div><font face="monospace, monospace">vtkIOMINC.py
                                                0.087</font></div>
                    <div><font face="monospace, monospace">vtkIOSQL.py  
                                               0.087</font></div>
                    <div><font face="monospace, monospace">vtkInfovisCore.py
                                           0.087</font></div>
                    <div><font face="monospace, monospace">vtkFiltersHybrid.py
                                         0.085</font></div>
                    <div><font face="monospace, monospace">vtkIOPLY.py  
                                               0.085</font></div>
                    <div><font face="monospace, monospace">vtkFiltersCore.py
                                           0.084</font></div>
                    <div><font face="monospace, monospace">vtkImagingGeneral.py
                                        0.084</font></div>
                    <div><font face="monospace, monospace">vtkRenderingLabel.py
                                        0.083</font></div>
                    <div><font face="monospace, monospace">vtkImagingMath.py
                                           0.082</font></div>
                    <div><font face="monospace, monospace">vtkInfovisLayout.py
                                         0.082</font></div>
                    <div><font face="monospace, monospace">vtkCommonExecutionModel.py
                                  0.081</font></div>
                    <div><font face="monospace, monospace">vtkIOCore.py
                                                0.081</font></div>
                    <div><font face="monospace, monospace">vtkFiltersGeneric.py
                                        0.080</font></div>
                    <div><font face="monospace, monospace">vtkIOEnSight.py
                                             0.080</font></div>
                    <div><font face="monospace, monospace">vtkViewsContext2D.py
                                        0.080</font></div>
                    <div><font face="monospace, monospace">vtkFiltersAMR.py
                                            0.079</font></div>
                    <div><font face="monospace, monospace">vtkFiltersParallelImaging.py
                                0.079</font></div>
                    <div><font face="monospace, monospace">vtkImagingCore.py
                                           0.079</font></div>
                    <div><font face="monospace, monospace">vtkImagingFourier.py
                                        0.079</font></div>
                    <div><font face="monospace, monospace">vtkInteractionImage.py
                                      0.079</font></div>
                    <div><font face="monospace, monospace">vtkInteractionStyle.py
                                      0.079</font></div>
                    <div><font face="monospace, monospace">vtkRenderingContext2D.py
                                    0.079</font></div>
                    <div><font face="monospace, monospace">vtkImagingColor.py
                                          0.078</font></div>
                    <div><font face="monospace, monospace">vtkRenderingImage.py
                                        0.078</font></div>
                    <div><font face="monospace, monospace">vtkRenderingVolumeOpenGL2.py
                                0.078</font></div>
                    <div><font face="monospace, monospace">vtkFiltersPython.py
                                         0.077</font></div>
                    <div><font face="monospace, monospace">vtkIOParallelXML.py
                                         0.077</font></div>
                    <div><font face="monospace, monospace">vtkImagingStatistics.py
                                     0.077</font></div>
                    <div><font face="monospace, monospace">vtkViewsInfovis.py
                                          0.077</font></div>
                    <div><font face="monospace, monospace">vtkFiltersSources.py
                                        0.076</font></div>
                    <div><font face="monospace, monospace">vtkIOVideo.py
                                               0.076</font></div>
                    <div><font face="monospace, monospace">vtkFiltersFlowPaths.py
                                      0.075</font></div>
                    <div><font face="monospace, monospace">vtkFiltersParallel.py
                                       0.075</font></div>
                    <div><font face="monospace, monospace">vtkFiltersSMP.py
                                            0.075</font></div>
                    <div><font face="monospace, monospace">vtkFiltersSelection.py
                                      0.075</font></div>
                    <div><font face="monospace, monospace">vtkIOImport.py
                                              0.075</font></div>
                    <div><font face="monospace, monospace">vtkImagingHybrid.py
                                         0.075</font></div>
                    <div><font face="monospace, monospace">vtkRenderingAnnotation.py
                                   0.075</font></div>
                    <div><font face="monospace, monospace">vtkDomainsChemistry.py
                                      0.073</font></div>
                    <div><font face="monospace, monospace">vtkFiltersImaging.py
                                        0.073</font></div>
                    <div><font face="monospace, monospace">vtkRenderingCore.py
                                         0.073</font></div>
                    <div><font face="monospace, monospace">vtkIOExport.py
                                              0.072</font></div>
                    <div><font face="monospace, monospace">vtkIOLegacy.py
                                              0.072</font></div>
                    <div><font face="monospace, monospace">vtkRenderingContextOpenGL2.py
                               0.072</font></div>
                    <div><font face="monospace, monospace">vtkCommonTransforms.py
                                      0.071</font></div>
                    <div><font face="monospace, monospace">vtkFiltersGeneral.py
                                        0.071</font></div>
                    <div><font face="monospace, monospace">vtkIOLSDyna.py
                                              0.071</font></div>
                    <div><font face="monospace, monospace">vtkImagingMorphological.py
                                  0.071</font></div>
                    <div><font face="monospace, monospace">vtkImagingStencil.py
                                        0.071</font></div>
                    <div><font face="monospace, monospace">vtkIOXML.py  
                                               0.070</font></div>
                    <div><font face="monospace, monospace">vtkImagingSources.py
                                        0.070</font></div>
                    <div><font face="monospace, monospace">vtkFiltersGeometry.py
                                       0.069</font></div>
                    <div><font face="monospace, monospace">vtkFiltersHyperTree.py
                                      0.069</font></div>
                    <div><font face="monospace, monospace">vtkFiltersProgrammable.py
                                   0.069</font></div>
                    <div><font face="monospace, monospace">vtkCommonSystem.py
                                          0.068</font></div>
                    <div><font face="monospace, monospace">vtkParallelCore.py
                                          0.067</font></div>
                    <div><font face="monospace, monospace">vtkDomainsChemistryOpenGL2.py
                               0.066</font></div>
                    <div><font face="monospace, monospace">vtkFiltersExtraction.py
                                     0.066</font></div>
                    <div><font face="monospace, monospace">vtkRenderingLOD.py
                                          0.065</font></div>
                    <div><font face="monospace, monospace">vtkFiltersTexture.py
                                        0.063</font></div>
                    <div><font face="monospace, monospace">vtkViewsCore.py
                                             0.061</font></div>
                    <div><font face="monospace, monospace">vtkChartsCore.py
                                            0.060</font></div>
                    <div><font face="monospace, monospace">vtkIOGeometry.py
                                            0.059</font></div>
                    <div><font face="monospace, monospace"><br>
                      </font></div>
                    <div><font face="monospace, monospace"><b>Total    
                                                     7.119</b></font></div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      With kind regards,<br>
      <br>
      <strong>Dr. Paul K Korir, PhD</strong><br>
      <i>Scientific Programmer</i><br>
      EMBL-EBI<br>
      Main Building, A2-35,<br>
      WTGC, Hinxton, Cambridge CB10 1SD<br>
      P: +44 1223 49 44 22<br>
      F: +44 1223 49 44 68</div>
  </body>
</html>