Performance issues due to plugins with a high number of XML files
Symptoms
I have a plugin with a lots of XML files (~120 filters), namely: the Topology ToolKit, which is also included in the ParaView release. Since the introduction of the new categories manager, there are various actions that takes a large amount of time to be accomplished in ParaView.
- The
Manage Plugins > Load selected
for this plugin takes several minutes- If I autoload /
PV_PLUGIN_PATH
the plugin however, the startup works as usual: it takes a few seconds.
- If I autoload /
- Once the plugin in loaded, a
Catalyst > Connect
also takes several minutes - There are certainly other interactions I did not try, like a connect to server, reset session, ...
Analysis
I have tried to execute ParaView with a higher verbosity to get more information and I have loaded the Topology ToolKit plugin. The trace is attached at the end of this report. The import started at 7.2s and ended at 524.5s, and in-between there are a lots of:
( XXs) [paraview ] pqProxyCategory.cxx:523 9| Categories written to settings.
( XXs) [paraview ] pqProxyCategory.cxx:552 9| Categories loaded from settings.
( XXs) [paraview ] pqProxyCategory.cxx:552 9| Categories loaded from settings.
I assume this issue would stand for any plugin with a high number of XML and is not related to TTK per sei.
Looking at the structure of the file, series of Categories written / loaded
are called again and again with an increasing number of call. It seems like each XML added would trigger a full recomputation of the XML properties, read write included. Somehow, this is not the case when plugin are loaded directly at startup.
How to reproduce:
- Dowload and extract or build the corresponding ParaView build
- Run Paraview:
./bin/paraview -v TRACE
Tools > Manage Plugins > Topology ToolKit: Load selected
- Check the logs
Attached file:log.txt