some FIND_PACKAGE components are slow

Hello,

just to report an issue that may hide some bug… When updating my build process to ParaView 5.7 I had to specify more precisely the component I will use in my plugins & custom app in the CMake FIND_PACKAGE directive. This caused a very slow find process. Here are the details:

  • FIND_PACKAGE( ParaView REQUIRED ) => Very fast but VTK libs are not linked to my plugin & custom app
  • FIND_PACKAGE( ParaView COMPONENTS ClientServerCorePython VTKExtensionsRendering REQUIRED ) => Still very fast but also missing some dependencies, so…
  • FIND_PACKAGE( ParaView COMPONENTS ClientServerCorePython VTKExtensionsRendering ServerManagerRendering pqPython REQUIRED ) => becomes very slow in the finding process, but all works perfectly (build & execution). Tested independently, pqPython and ServerManagerRendering modules are very slow to resolve.

Maybe I am doing something wrong, I don’t know. For now I am investigating on Windows 10, ParaView 5.7, Visual Studio 2015, CMake 3.14.1.

Thanks,
Yves

The way that this works is that we find dependencies based on what components were passed. I’m curious why no components (which is equivalent to “all”) is slower than requesting specific components, but I suppose those two modules have large dependency trees from them and it takes a while to resolve them. All of that logic is at the top of ParaView-vtk-module-find-packages.cmake in the ParaView CMake directory. It is stamped out from some template code. Looking at it, I do see one issue. Try making this change in both of the vtk-module-find-packages.cmake files in ParaView’s directory (ParaView and VTK each have one):

-  if ("" IN_LIST _vtk_module_find_package_components_checked)
+  if (_vtk_module_component IN_LIST _vtk_module_find_package_components_checked)
1 Like

MR is here: https://gitlab.kitware.com/vtk/vtk/merge_requests/6048

I confirm that it solved the problem :slight_smile:

Yves

1 Like