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

Tiled not unloading files stored in RAM #4063

Open
cowardlycamper32 opened this issue Sep 28, 2024 · 3 comments
Open

Tiled not unloading files stored in RAM #4063

cowardlycamper32 opened this issue Sep 28, 2024 · 3 comments
Labels
bug Broken behavior.

Comments

@cowardlycamper32
Copy link

Describe the bug
While loading a large sum of image files, I noticed memory usage had hit 90%+ and so closed the file i was currently working on. Memory usage did not change.

To Reproduce
Steps to reproduce the behavior:

  1. Load large amount of files
  2. Open Task Manager, or similar system viewer
  3. Close Tab with large amount of files
  4. Observe memory usage not changing

Expected behavior
Expected memory usage to decrease when closing tab and deloading the images.

Media
N/A

Specifications:

  • OS: Windows 11
  • Tiled Version: 1.11.0
@cowardlycamper32 cowardlycamper32 added the bug Broken behavior. label Sep 28, 2024
@eishiya
Copy link
Contributor

eishiya commented Sep 28, 2024

You closed the tab of the file, but did you make sure the file wasn't actually used by some other document, and therefore still loaded? Tilesets remain loaded if they're included in any open map, and I think Maps remain loaded if their World is loaded.

I think Assets also remain loaded for the purposes of Reopen Closed File, so it may take a couple of file closures to actually remove them.

@cowardlycamper32
Copy link
Author

I havent used any of the assets yet so the tiles shouldnt be used elsewhere. I understand the reopen closed tab part, but from further testing, memory usage seems to increse slightly upon closing a tab

@bjorn
Copy link
Member

bjorn commented Sep 30, 2024

Currently the image cache used by Tiled indeed never gets cleared, so if Tiled eats lots of memory due to having loaded many images, the only way to reduce memory usage is by restarting Tiled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

3 participants