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

Stop printing to the output window when all evaluations are interrupted #978

Closed
livtanong opened this issue Jan 22, 2021 · 2 comments
Closed

Comments

@livtanong
Copy link

How it happened

Accidentally evaluated a function that ended up outputting about 5k lines worth (And each line was of substantial length as well) of material onto the REPL. Interrupting evaluation didn't work because it was already evaluated, so it's a bottleneck of printing.

Thoughts

The following is a summary of what @bpringe has said to me about the matter:

The output window queues up prints and uses the applyEdit function of the VSCode API. Because applyEdit is async, it happens after evaluation, and it's slow in general, which is why printing seems to happen in chunks with what appears to be a pause in between each chunk.

The solution will likely lie in clearing this queue, which should be pretty easy because it's just an array.

@bpringe
Copy link
Member

bpringe commented Jan 22, 2021

Just to verify, you are talking about stdout material being printed, not the eval result, right?

@livtanong
Copy link
Author

Yes, that is correct!

@PEZ PEZ changed the title Huge evaluations, even if interrupted, still try to write to output buffer Print side effects keeps printing to the output buffer even when the evaluation is interrupted Jan 23, 2021
@PEZ PEZ removed the enhancement label Feb 10, 2021
@bpringe bpringe added the bug Something isn't working label Mar 26, 2021
@bpringe bpringe changed the title Print side effects keeps printing to the output buffer even when the evaluation is interrupted Print side effects keep printing to the output window even when the evaluation is interrupted Mar 26, 2021
@bpringe bpringe removed the bug Something isn't working label Mar 26, 2021
@bpringe bpringe changed the title Print side effects keep printing to the output window even when the evaluation is interrupted Stop printing to the output window when all evaluations are interrupted Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants