-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Analysis Server doesn't release memory after project close #24613
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
Comments
I open the project with analyzer and analysis_server modules. So, I guess DAS does release the memory, but VM still keeps some of it allocated. @johnmccutchan @iposva-google Does VM release memory to OS when the application stops using so much memory? |
In your example the VM released about 200MB back to the OS, but keeps some memory around expecting you to grow again. Which is what your get when you reopen a project again. |
@iposva-google Yes, I see that it releases some memory. I'd like to understand it better - what is an approximate algorithm here? Does VM release memory up to some fixed size, like 400MB or up to some percentage of the max heap size, or...? |
I think we have found the/a reason why memory is not released after closing a big project. |
We need not just to cancel the subscription, but also to remove it from the map. It's not so bad now for the MDL project, but any similar project will use a lot of memory even after closign the project. This may be the reason of one of the issues opened against DAS. [email protected], [email protected] BUG= #24613 Review URL: https://codereview.chromium.org/1447603004 .
I believe the issue was fixed. |
I played a bit with today's 1.14.0-edge.674a2f6d90ea063b13a33a74d7bb010f062ae8fe:
|
I would love to have / know this project for testing. When I open the whole SDK repo, wait for analysis and close the project memory usage drops tenfold. But the allocated heap size does not. I opened a new issue against the VM. |
I checked memory using Sysinternals' Process Explorer. It shows allocated memory. I think if I looked at it using Observatory I would also see that 90% of allocated memory not used. |
Sent: {"id":"49","method":"analysis.getErrors","params":{"file":"/home/dart/x/lib/c_wizard.dart"}} also if you do this (notice same file name) file is declaring a lib, creating object, nothing fancy |
analysis_setAnalysisRoots
.After that I waited for several minutes, but Analysis Process still consumes several gigabytes of memory. (Windows 8.1, SDK 1.13-dev.7.0)
The text was updated successfully, but these errors were encountered: