Skip to content

Conversation

@AlejandroFernandezLuces
Copy link
Collaborator

Closes #291

@github-actions github-actions bot added the bug Something isn't working label Sep 26, 2025
@RobPasMue
Copy link
Member

Please verify load times and make sure that it improves

@RobPasMue
Copy link
Member

I would even confirm that the vtk package is not loaded in the Python context whenever you import the Plotter class for example

@AlejandroFernandezLuces
Copy link
Collaborator Author

Load times and imports for running from ansys.tools.visualization_interface import Plotter:

Before:
importtime_vtk

With VTK lazy imports:
importtime_novtk

Looks like a good improvement 😄

@AlejandroFernandezLuces
Copy link
Collaborator Author

@koubaa this should improve the situation in PyMAPDL, let me know if you have any feedback!

Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @AlejandroFernandezLuces!

Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlejandroFernandezLuces AlejandroFernandezLuces merged commit d0f3c2f into main Sep 30, 2025
23 checks passed
@AlejandroFernandezLuces AlejandroFernandezLuces deleted the fix/lazy-import-vtk branch September 30, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

importing ansys.tools.visualization loads vtk libraries

4 participants