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

Significantly improve memory usage when rendering zoom levels #21

Merged
merged 1 commit into from
Nov 26, 2019
Merged

Significantly improve memory usage when rendering zoom levels #21

merged 1 commit into from
Nov 26, 2019

Conversation

barrett777
Copy link
Contributor

Disposing of bitmaps made the biggest impact here. They must have been hanging on to file locks or something. Right now everything is bitmap in this area. In the future if you add other image types, it would probably be good to add IDisposable to your interface, and dispose of all images instead of just bitmaps.

I also added code to force garbage collection, which looks like it helps a little. I think it is frowned upon to try to manage the garbage collector, but since we know this is the peak memory usage point, I think it's okay to do it here.

(Fixes #12) (Fixes #20)

@mjungnickel18 mjungnickel18 merged commit bd65f50 into papyrus-mc:master Nov 26, 2019
@barrett777 barrett777 deleted the feature/Improve_Memory_Usage branch November 26, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Very high memory usage on the Rendering Level stage Memory Limits
2 participants