From 07ae3cfac2c2737d7c1167c77e1d840e1ca36864 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 30 Mar 2009 21:10:16 +0000 Subject: [PATCH] sort only for each edge, so related nodes will be closer to each other svn: r14364 original commit: c880b1297c8279c42ca77541d6e908b4b00c3145 --- collects/profile/analyzer.ss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/profile/analyzer.ss b/collects/profile/analyzer.ss index a0f07e6..c080f4f 100644 --- a/collects/profile/analyzer.ss +++ b/collects/profile/analyzer.ss @@ -156,10 +156,10 @@ (let loop ([todo (list x)] [seen (list x)]) (if (null? todo) '() - (let* ([next (append-map (lambda (x) (map edge-callee (node-callees x))) + (let* ([next (append-map (lambda (x) + (subsort (map edge-callee (node-callees x)))) todo)] - [next (remove-duplicates next)] - [next (subsort (remq* seen next))]) + [next (remq* seen (remove-duplicates next))]) (append todo (loop next (append next seen))))))) #| (define (node id) (make-node id #f '() 0 0 '() '()))