Skip to content

Fix tree view jumparound once for all #1905

@etosan

Description

@etosan

I think I opened this issue back when this was under @hishamhm's care, and even that a lot changed since then, this issue is making htop so unusable that I am forced to use it less and less .. especially since competition is catching up ... which is a great pity.

Tree mode is most useful of modes for sysadmins, since it shows process hierarchies on the machine, which can deliver much more information, than pure COLUMN ordered process list.

Unfortunately as machines get bigger the process trees grow bigger as well.

Due to process being relatively cheap resource, on modern machines, the process activity, especially creation and destruction rate, is little bit higher than during the days of old.

And therein lies the issue: when you put htop into ptree mode, it constantly jumps around on the screen as processes fork and exit. Besides quick glance, you cannot really do anything useful, because exactly when you want to do some process op, the screen jumps, and you select wrong process. Bummer.

This issue is ancient. And it's becoming mighty annoying.

What is worse, I was told, back then, that due to design of the tree renderer, this issue is "unfixable".

Unfortunately, since some years ago, top, from procps-ng, which is "native" to most distros, grew ability to draw trees.

Start top and then press V (as in Shift+V) and behold: a tree! What is more concerning: Look ma! No jumping!

How they do? Woof!? Woof!?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions