From 6541ec94d585becda1ee7607eafc76a11c60be9f Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 24 May 2019 16:42:39 -0700 Subject: [PATCH] improve behavior with generated pagetree --- pollen/private/ts.rktd | 2 +- pollen/render.rkt | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index 77f9e08..3a92ff4 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1556380529 +1558741359 diff --git a/pollen/render.rkt b/pollen/render.rkt index 45d6c53..3fec780 100644 --- a/pollen/render.rkt +++ b/pollen/render.rkt @@ -78,15 +78,19 @@ [path (cons path (loop (cdr paths)))]))))) (for ([path-group (in-list (slice-at flattened-paths (length worker-places)))]) - (for ([path (in-list path-group)] + (define source-paths (for*/list ([path (in-list path-group)] + [source-path (in-value (->source-path path))] + #:when source-path) + source-path)) + (for ([source-path (in-list source-paths)] [(wp wpidx) (in-indexed worker-places)]) (message (format "rendering parallel on core ~a /~a" (add1 wpidx) - (find-relative-path (current-project-root) (->source-path path)))) - (place-channel-put wp (cons path (current-poly-target)))) - (for ([path (in-list path-group)] + (find-relative-path (current-project-root) source-path))) + (place-channel-put wp (cons source-path (current-poly-target)))) + (for ([source-path (in-list source-paths)] [(wp wpidx) (in-indexed worker-places)]) (message (format "rendered parallel on core ~a /~a" (add1 wpidx) - (find-relative-path (current-project-root) (->output-path path)))) + (find-relative-path (current-project-root) (->output-path source-path)))) (place-channel-get wp)))] [else (for-each render-from-source-or-output-path paths)]))