LoadPlugin bad performance compared to PV_PLUGIN_PATH
Initally reported here : https://discourse.paraview.org/t/performance-issue-with-loadplugin-ttk-module/2126/2
LoadPlugin method has bad performance, especially compared to PV_PLUGIN_PATH.
Steps to reproduce
- build paraview with python and LagrangianParticleTracker plugin
- write the following in a plugin.py python script
from paraview.simple import *
LoadPlugin("/path/to/pv/build/lib/paraview-5.7/plugins/LagrangianParticleTracker/LagrangianParticleTracker.so", ns=globals())
LagrangianParticleTracker
-
time for i in {1..10}; do ./bin/pvpython ~/path/to/plugin.py; done
-> 30s on my computer - Comment the LoadPlugin line in plugin.py
-
time for i in {1..10}; do PV_PLUGIN_PATH=/path/to/pv/build/lib/paraview-5.7/plugins/LagrangianParticleTracker/ ./bin/pvpython ~/path/to/plugin.py; done
-> 17s on my computer