I am the lead developer of ttk (https://topology-tool-kit.github.io/), an open-source library for topological data analysis, which massively relies on the vtk/paraview ecosystem.
ttk ships with a plugin for paraview.
we use this plugin to provide python support to our users.
currently, we recommend users to use pvpython, as described in this example:
on my system, this example takes 2 seconds to execute.
however, several users expressed the need to use a vanilla python interpreter instead of pvpython (in particular, to integrate ttk into an existing python project).
to run with a default python interpreter (as described there: https://kitware.github.io/paraview-docs/latest/python/quick-start.html), I setup the PYTHONPATH and LD_LIBRARY_PATH as follows:
$ export PYTHONPATH="/usr/local/lib/python3.6/site-packages/"
$ export LD_LIBRARY_PATH="/usr/local/lib/:/usr/local/lib/plugins"
(paraview is installed in /usr/local and the ttk plugin in /usr/local/lib/plugins, I use python 3.6)
next, in my python code (https://github.com/topology-tool-kit/ttk/blob/master/examples/python/ttkExample-python.py), I add, line 34, the following instruction:
the corresponding diff is shown here:
and the rest of the script executes properly, … but it takes 40 seconds!
38 of these are spent in the call LoadPlugin()
so here are my questions:
- is there anything that I did wrong here?
- is there a serious performance issue with this function?
my understanding of the situation is that pvpython (https://github.com/Kitware/ParaView/blob/master/CommandLineExecutables/pvpython.h) is loading the plugin natively in C++ while LoadPlugin() does some additional parsing in python.
could that be it?
thanks a lot for your help!