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

Make Output panel memory efficient #40196

Closed
bpasero opened this issue Dec 14, 2017 · 3 comments
Closed

Make Output panel memory efficient #40196

bpasero opened this issue Dec 14, 2017 · 3 comments
Assignees
Labels
debt Code quality issues on-testplan output Output channel system issues perf
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Dec 14, 2017

Dispose output channel text buffers when output channel hidden

It looks like today we create buffers for output channels as soon as an output channel gets visible but there is no associated lifecycle to ever dispose these documents again when the output channel is hidden. I suggest to add something similar as we have for text editors: once a text editor is closed, we dispose the buffer. For output we can dispose if:

  • the output channel switches to another channel
  • the output panel is hidden or switched to another panel

I just verified that we constantly update the output channel buffer when output is received even when the output panel is not visible. Worse, all channel buffers seem to get created as soon as the output panel is activated once.

Use files to store receiving messages

Currently we store incoming messages in memory buffers and they remain for the complete window session so that they can be retained when the channel is visible. By using a file as a backup to store incoming messages, all this memory can be freed up when no channels are shown.

/cc @sandy081

@bpasero bpasero added debt Code quality issues output Output channel system issues perf labels Dec 14, 2017
@sandy081 sandy081 self-assigned this Dec 14, 2017
@sandy081
Copy link
Member

I am doing some work in this area here #40180

@sandy081
Copy link
Member

Also models for output channels should be disposed. I see they are still hanging around even when they are not visible.

@sandy081 sandy081 added this to the December 2017/January 2018 milestone Dec 14, 2017
sandy081 added a commit that referenced this issue Dec 18, 2017
- Listen to model added/removed changes to start/stop watching the file
- Clean up and simplify implementation
sandy081 added a commit that referenced this issue Dec 19, 2017
- Supporting rotatitng files
- Handle the case when the model is being resolved from file
- Fallback to BufferredOutputChannel on error
@bpasero
Copy link
Member Author

bpasero commented Dec 20, 2017

@sandy081 awesome work dude 👍

@sandy081 sandy081 changed the title Dispose output channel text buffers when output channel hidden Make Output panel memory efficient Dec 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues on-testplan output Output channel system issues perf
Projects
None yet
Development

No branches or pull requests

3 participants