From 43caa7a144fccce3f773f5fa07ed80f515abce38 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Thu, 9 Aug 2018 00:00:00 -0500 Subject: [PATCH] top: speed up the collapsed children forest view logic In forest view mode, once a collapsible parent process and all of its children (if any) have been identified, there is no longer a need to scan the remaining tasks. So this patch will just force a new scan for any other 'Hide_pid' entries which might remain to be identified after a targeted parent has been completely processed. Signed-off-by: Jim Warner --- top/top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/top/top.c b/top/top.c index 771f6dbf..5a3d9581 100644 --- a/top/top.c +++ b/top/top.c @@ -4367,6 +4367,8 @@ static void forest_begin (WIN_t *q) { } // children found (and collapsed), so mark that puppy if (children) rSv_Hid(parent) = 'x'; + // this will force a check of the next Hide_pid, if any + j = PIDSmaxt; } } }