5 ms·
The memory usage doesn't grow indefinitely, it's not a leak. Opening a large file, closing it, then opening more smaller files doesn't cause further growth. If
by nickelpro 6y ago
The memory usage doesn't grow indefinitely, it's not a leak. Opening a large file, closing it, then opening more smaller files doesn't cause further growth. If VS Code was holding onto old references from opening files:
A) It would be spotted immediately, opening files is core behavior for VS Code
B) The memory usage would continue to grow after closing old files and opening new ones
What this bug is seeing is memory fragmentation and/or reluctance by V8 to release a large allocation block. In either case, those kinds of details are way outside the arena of what VS Code deals with.
Importantly, it's also not anyone's job to explain this to random Github commentators or HN. If the maintainers say its not a bug or outside the scope that's the end of it, and if you don't like that you are free to use other software or fork the project for your own needs.
- hajile 6y agoThe original filer stated that an identical electron version on older builds didn't have the same issue. If it were compaction is there a good reason for this behavior? This seems very much like they are retaining references somewhere instead. Thankfully WeakRef has shipped with newer Chrome/Firefox and should make some of these things easier to code around.