Skip to content

Memory consumption considerations #1738

Answered by antonfirsov
fdhsdrdark asked this question in Q&A
Discussion options

You must be logged in to vote

What are your typical image sizes?

Why all the MemoryStream-s and the byte[] ? You can do Image.Load(filePath) / Image.Load(fileStream) as well as image.Save(filePath, format) and image.Save(fileStream, format).

Had a look on the Memory Managment section on the documentation and enabled ModeratePooling.
[...]
on every image request the memory usage is drastically increased.
I manually triggered Garbagge Collection and that seems to resolve temporarilly the issue.

With moderate pooling, Image is more likely to allocate arrays which won't be cleaned up until GC triggers. I recommend to keep the default pooling, and do some stress test of your app on the server. Normally GC should clean th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fdhsdrdark
Comment options

Answer selected by fdhsdrdark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants