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

buffer interleaved output to reduce switching #136

Open
jellevandenhooff opened this issue Apr 19, 2024 · 2 comments
Open

buffer interleaved output to reduce switching #136

jellevandenhooff opened this issue Apr 19, 2024 · 2 comments
Labels
enhancement New feature or request needs thought We have some decisions to make before moving on this.

Comments

@jellevandenhooff
Copy link

jellevandenhooff commented Apr 19, 2024

It might be nice to buffer output a bit for interleaved tasks: If I have two concurrent running tasks (say a front-end build and back-end build, or front-end and back-end tests), and they are both running at high speed (say they're cached go tests), right now the logs will end up interleaved like AAA BBB AA BB AA BB with whitespace in between each task switch. Mentally parsing the logs is more difficult because you repeatedly have to context switch. Also, though the spacing is nice for reading, it ends up taking a lot of space than necessary. What if the printer waited a little bit (maybe 100ms, maybe somehow cleverly calculated from task runtime or previous logging behavior) after printing AAA, and if more logs came in, it would postpone outputting the B so you'd get AAAAAA BBBBB?

@amonks
Copy link
Owner

amonks commented Apr 19, 2024

[splitting this into into 3 issues]

@amonks amonks changed the title some UI ideas buffer interleaved output to reduce switching Apr 19, 2024
@amonks amonks added enhancement New feature or request needs thought We have some decisions to make before moving on this. labels Apr 19, 2024
@amonks
Copy link
Owner

amonks commented Apr 19, 2024

I agree that this would be helpful for readability, but I'm a bit worried that putting logs out of order could make it harder to think about causal ordering, in systems where that matters. I wonder how often that would come up.

I imagine I'm currently the heaviest run user, so I'll try to keep this in the back of my mind for a while and see if I end up with an opinion about the tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs thought We have some decisions to make before moving on this.
Projects
None yet
Development

No branches or pull requests

2 participants