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

VFS takes too much memory #16301

Closed
Veykril opened this issue Jan 7, 2024 · 2 comments · Fixed by #16307
Closed

VFS takes too much memory #16301

Veykril opened this issue Jan 7, 2024 · 2 comments · Fixed by #16307
Labels
A-perf performance issues A-vfs Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Jan 7, 2024

Now arguably this is also a fault of the bevy crate depending on 4 versions of the windows crate, but a bare bevy project consumes 800mb of memory just for us to hold the entire source in memory in the VFS (without any windows source files its ~90mb. This is beyond excessive, especially when you realize that this is doubled once we put the source into salsa in a normalized form! We definitely need to rethink our strategy here.

@Veykril Veykril added A-perf performance issues Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug A-vfs labels Jan 7, 2024
@lnicola
Copy link
Member

lnicola commented Jan 7, 2024

Not even compressing individual files will help here, that won't get us more than 50% off.

@Veykril
Copy link
Member Author

Veykril commented Jan 7, 2024

Yes this is tricky. Assuming we can't do anything for the normalized files in salsa for the time being, we can at least drop the unnormalized files from the VFS for non workspace members I think. The only purpose they have is for processing DidChangeTextDocument notifications which can have diffs, but for library files, they shouldnt really ever change so incurring IO when processing an event for such a file should be fine. That would get rid of a big chunk of memory waste here at least (~35-40%).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-perf performance issues A-vfs Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants