setup "images" collection earlier, "drracket" at end

This change cuts real time of "raco setup -D" almost in half
on a 4-core machine.
This commit is contained in:
Ryan Culpepper 2012-02-28 02:29:32 -07:00
parent 3e6069a70f
commit 94ae918b0f

View File

@ -752,15 +752,12 @@
(define (make-zo-step)
(define (partition-cct name cct)
(partition (lambda (x) (not (string=? (cc-name (car x)) name))) cct))
(define (move-to-begining names cct)
(let loop ([names (reverse (if (list? names) names (list names)))]
[cct cct])
(match names
[(list) cct]
[(cons name names)
(loop names
(call-with-values (lambda () (define-values (a b) (partition-cct name cct)) (values b a)) append))])))
(define (move-to-end name cct) (call-with-values (lambda () (partition-cct name cct)) append))
(define (move-to where names cct)
(for/fold ([cct cct]) ([name (in-list (reverse names))])
(let-values ([(diff same) (partition-cct name cct)])
(case where
((beginning) (append same diff))
((end) (append diff same))))))
(setup-printf #f "--- compiling collections ---")
(match (parallel-workers)
[(? (lambda (x) (x . > . 1)))
@ -768,8 +765,8 @@
(managed-compile-zo (collection-file-path "parallel-build-worker.rkt" "setup"))
(with-specified-mode
(lambda ()
(let ([cct (move-to-begining (list "compiler" "raco" "racket")
(move-to-end "drscheme"
(let ([cct (move-to 'beginning (list "compiler" "raco" "racket" "images")
(move-to 'end (list "drracket" "drscheme")
(sort-collections-tree
(collection-tree-map top-level-plt-collects))))])
(iterate-cct (lambda (cc)