<div dir="ltr">Hi Utkarsh,<div><br></div><div>As usual, I'm a stickler for backwards compatibility and would rather go in the other direction,</div><div><br></div><div>  import vtkminimal as vtk</div><div><br></div><div> - David<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 10:55 AM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Folks,<br>
<br>
This is in reference to this: <a href="https://gitlab.kitware.com/vtk/vtk/issues/16780" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>vtk/vtk/issues/16780</a><br>
<br>
`import vtk` is slow because it imports all of VTK. It isn't the best<br>
practice, and has no workaround -- given the current implementation<br>
where all the modules are imported in vtk/__init__.py itself.<br>
<br>
I have an MR in progress that addresses this issue:<br>
<a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/1921" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>vtk/vtk/merge_requests/1921</a><br>
<br>
This MR does the following:<br>
* vtk/__init__.py no longer imports all of VTK.<br>
* vtk/all.py is a new module that imports all of VTK.<br>
<br>
This does break old scripts, but provides an easy workaround. For<br>
users who want to keep previous behavior, they can simply do the<br>
following:<br>
<br>
   from vtk import all as vtk<br>
<br>
Thoughts? If this looks reasonable to everyone, I'll update the MR to<br>
fix all tests accordingly.<br>
<br>
Thanks<br>
Utkarsh<br></blockquote></div></div></div></div>