Tewr / BlazorFileReader

Library for creating read-only file streams from file input elements or drop targets in Blazor.
MIT License
426 stars 61 forks source link

Free memory after upload file #96

Closed nguyenvanbien95 closed 4 years ago

nguyenvanbien95 commented 4 years ago

Hi, thanks for your help. How to free memory after upload file? Memory of app increase a lot after I upload a file 500 kb. Memory grow up about 10 MB. I used ANTS to Profiler. Thank you so much.

Tewr commented 4 years ago

First question, Are you using client side or server side blazor? Memory going up slightly when reading a file is perfectly normal. Memory going up indefinitely as ffiles ar consumed is however not normal, and could mean a memory leak. is this what you're experiencing?

nguyenvanbien95 commented 4 years ago

I have used server side blazor. Memory going up indefinitely and I can not find any problem in code.

Tewr commented 4 years ago

Hello again, I've managed to find the time to run a memory profiler, but I can't find any leak.

Here is the memory chart of uploading files which are about 6Mb. Sure there are some additional allocations at the first upload but the graph flatlines quickly. Memory-Footprint

Unless you can give me some additional information I'm closing this as non-reproducible.

nguyenvanbien95 commented 4 years ago

Thanks for your supporting. It seem is not problem. I saw Unmanaged memory is high. I asked .Net team for this problem. They said that is normal, memory is freed when memory is low. In my server, GC is not run regularly, so memory will grow up to limit.