[vtk-developers] Speeding up `import vtk`
Jean-Christophe Fillion-Robin
jchris.fillionr at kitware.com
Fri Dec 15 00:04:52 EST 2017
Hi Utkarsh,
I would prefer to have a more generic way of configuring the import
behavior.
The idea would be to have two top-level packages: vtk and vtkConfig
To skip loading of all module, you would do:
-------------------
import vtkConfig
vtkConfig.VTK_MODULE_IMPORT = vtkConfig.EXPLICIT # Default would be
vtkConfig.ALL. Later we could also have vtkConfig.LAZY
import vtk
-------------------
This would allow to keep things coherent for our user. Naming the package
"vtkmodules" seem unconventional.
It would also have the advantage of support addition of new option.
For example:
vtkConfig.RENDERING_METHOD = vtkConfig.OFFSCREEN # or vtkConfig.MESA,
....
Jc
On Tue, Dec 12, 2017 at 4:55 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:
> On Tue, Dec 12, 2017 at 3:18 PM, Ben Boeckel <ben.boeckel at kitware.com>
> wrote:
> > On Tue, Dec 12, 2017 at 15:06:15 -0500, Prabhu Ramachandran wrote:
> >> Would `vtkm` be a shorter name rather than `vtkmodules`?
> >
> > `vtkm` is a different project already (though I don't know of its status
> > with Python wrapping outside of the VTK filters which use it).
>
> Yea, alas `vtkm` won't be a good option.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
--
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vtk.org/pipermail/vtk-developers/attachments/20171215/5f5df513/attachment.html>
More information about the vtk-developers
mailing list