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:
parent
3e6069a70f
commit
94ae918b0f
|
@ -752,15 +752,12 @@
|
||||||
(define (make-zo-step)
|
(define (make-zo-step)
|
||||||
(define (partition-cct name cct)
|
(define (partition-cct name cct)
|
||||||
(partition (lambda (x) (not (string=? (cc-name (car x)) name))) cct))
|
(partition (lambda (x) (not (string=? (cc-name (car x)) name))) cct))
|
||||||
(define (move-to-begining names cct)
|
(define (move-to where names cct)
|
||||||
(let loop ([names (reverse (if (list? names) names (list names)))]
|
(for/fold ([cct cct]) ([name (in-list (reverse names))])
|
||||||
[cct cct])
|
(let-values ([(diff same) (partition-cct name cct)])
|
||||||
(match names
|
(case where
|
||||||
[(list) cct]
|
((beginning) (append same diff))
|
||||||
[(cons name names)
|
((end) (append diff same))))))
|
||||||
(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))
|
|
||||||
(setup-printf #f "--- compiling collections ---")
|
(setup-printf #f "--- compiling collections ---")
|
||||||
(match (parallel-workers)
|
(match (parallel-workers)
|
||||||
[(? (lambda (x) (x . > . 1)))
|
[(? (lambda (x) (x . > . 1)))
|
||||||
|
@ -768,10 +765,10 @@
|
||||||
(managed-compile-zo (collection-file-path "parallel-build-worker.rkt" "setup"))
|
(managed-compile-zo (collection-file-path "parallel-build-worker.rkt" "setup"))
|
||||||
(with-specified-mode
|
(with-specified-mode
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ([cct (move-to-begining (list "compiler" "raco" "racket")
|
(let ([cct (move-to 'beginning (list "compiler" "raco" "racket" "images")
|
||||||
(move-to-end "drscheme"
|
(move-to 'end (list "drracket" "drscheme")
|
||||||
(sort-collections-tree
|
(sort-collections-tree
|
||||||
(collection-tree-map top-level-plt-collects))))])
|
(collection-tree-map top-level-plt-collects))))])
|
||||||
(iterate-cct (lambda (cc)
|
(iterate-cct (lambda (cc)
|
||||||
(let ([dir (cc-path cc)]
|
(let ([dir (cc-path cc)]
|
||||||
[info (cc-info cc)])
|
[info (cc-info cc)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user