Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak: Massive RAM increase due to repeated FieldContainer.imshow() #833

Open
adtzlr opened this issue Aug 20, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@adtzlr
Copy link
Owner

adtzlr commented Aug 20, 2024

In an interactive session. It seems that the screenshot method, especially with nonlinear_subdivision > 1, eats the RAM. Unfortunately, we can't do much about it.

import felupe as fem

mesh = fem.Circle(n=12).add_midpoints_edges()
plotter = mesh.plot(off_screen=True)
img = plotter.screenshot()

import matplotlib.pyplot as plt

plt.imshow(img)

grafik

Even for such simple meshes and without nonlinear_subdivision > 1, only Restart Kernel helps to free the memory in an interactive Python session after multiple screenshot calls.

@adtzlr adtzlr added the bug Something isn't working label Aug 20, 2024
@adtzlr adtzlr self-assigned this Aug 20, 2024
@adtzlr adtzlr changed the title Memory Leak: RAM increases after each script execution Memory Leak: Massive RAM increase after calling FieldContainer.imshow() Aug 20, 2024
@adtzlr adtzlr changed the title Memory Leak: Massive RAM increase after calling FieldContainer.imshow() Memory Leak: Massive RAM increase due to FieldContainer.imshow() Aug 20, 2024
@adtzlr adtzlr changed the title Memory Leak: Massive RAM increase due to FieldContainer.imshow() Memory Leak: Massive RAM increase due to repeated FieldContainer.imshow() Aug 20, 2024
@adtzlr
Copy link
Owner Author

adtzlr commented Aug 29, 2024

this could be related to pyvista/pyvista#2252

@adtzlr
Copy link
Owner Author

adtzlr commented Sep 25, 2024

Hmm. This seems to be platform dependent. On Windows, the increase of RAM usage is notable but not that massive as on Linux.

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

No branches or pull requests

1 participant