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

Scrolling through container list pegs CPU #72

Closed
vielmetti opened this issue Apr 12, 2017 · 3 comments
Closed

Scrolling through container list pegs CPU #72

vielmetti opened this issue Apr 12, 2017 · 3 comments

Comments

@vielmetti
Copy link
Contributor

If I hold down the 'j' key on the main screen to scroll through the container list, I can convince 'ctop' to spike CPU usage.

What I expected: 'j' key to move to next line is an inexpensive operation, as is 'k' to move up.

What I got: CPU usage of ctop peaked at 80% during operations, then returned quickly to zero.

How invoked: ctop shell script on macos 10.11.6, docker Version 17.04.0-ce-mac7 (16352) / Channel: edge / b598153e23

#!/bin/sh
docker run -ti --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest
quay.io/vektorlab/ctop                       latest                        9b46336d11f0        2 days ago          5.59MB
@bcicen
Copy link
Owner

bcicen commented Jun 8, 2017

ctop avoids the expense of rendering per-row widgets when they are off-screen. As a result, the view and all displayed widgets must be re-aligned and re-drawn when scrolling through pages.

<pgup> and <pgdown> do mitigate this slightly by allowing page scrolling.

@bcicen
Copy link
Owner

bcicen commented Jun 8, 2017

One possible solution to alleviate load would be to suspend automatic(per-second) screen redraws temporarily while scrolling.

@bcicen
Copy link
Owner

bcicen commented Dec 5, 2017

per-second screen redraws are disabled during scrolling in the latest version; closing

@bcicen bcicen closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants