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

Progress indiciator is redrawn too frequently #3506

Open
dpc opened this issue Apr 15, 2024 · 5 comments
Open

Progress indiciator is redrawn too frequently #3506

dpc opened this issue Apr 15, 2024 · 5 comments
Labels
polish🪒🐃 Make existing features more convenient and more consistent

Comments

@dpc
Copy link

dpc commented Apr 15, 2024

Description

Steps to Reproduce the Problem

Use jj over some slower ssh connection. Run jj git fetch, watch how the redrawing progress bar slows down the whole ssh connection.

Expected Behavior

Limit the redraw frequency to 1/s, maybe slightly more.

Actual Behavior

Lag.

Specifications

  • Platform: NixOS
  • Version: jj 0.16.0
@khionu
Copy link
Collaborator

khionu commented Apr 15, 2024

This could probably be adaptive. There's likely a way we could measure, say, 200 redraws, and if they take longer than 1s, we could switch on a rate limit.

Addendum: As long as we're flushing each time, the buffer write should be synchronous after the draw, so that would give us the measure

@dpc
Copy link
Author

dpc commented Apr 15, 2024

It could, but I doubt anyone really needs FPS-game-like progress indication feedback. 10/s would probably both appear sufficiently smooth and not use too much badwidth no matter if used locally, over ssh, Tor, serial port, homing pigeon. It might struggle over smoke signals, I guess, due to really low bandwidth. But not exactly common use-case.

@necauqua
Copy link
Collaborator

necauqua commented Apr 15, 2024

Tor [..] homing pigeon

Idk man, some tor connections are incredibly slow.
And IPoAC has decent effective bandwidth but the ping is horrendous

@dpc
Copy link
Author

dpc commented Apr 15, 2024

It seems to me that here the biggest issue is the amount of data piling up to be delivered to the client. It stack on top of the normal latency. Enabling ssh compression might help a lot (someone suggested in on Discord).

BTW. Personally 1/s is real-time-enough for me anyway.

@PhilipMetzger PhilipMetzger added the polish🪒🐃 Make existing features more convenient and more consistent label Apr 15, 2024
@khionu
Copy link
Collaborator

khionu commented Apr 18, 2024

I like very smooth CLI rendering like JJ does, myself, and would be saddened if it were gone entirely. It may not be necessary, but it's pleasant, and locally it's perfectly fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polish🪒🐃 Make existing features more convenient and more consistent
Projects
None yet
Development

No branches or pull requests

4 participants