From 1bbf460f89dce6c7e897c99fde9dfbb6192aa7d7 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Mon, 29 May 2017 22:12:24 +0200
Subject: [PATCH] don't re-sort stale dimensions on cleanup as we don't know if
 we're going to need these at all. they will get resorted if and when needed.

---
 src/runner.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/runner.c b/src/runner.c
index e34d543479..ea8ccf1128 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -350,8 +350,7 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
   /* Clean-up the flags, i.e. filter out what's already been sorted unless
      we're cleaning up. */
   if (cleanup && c->dx_max_sort > 0.0f) {
-    /* Re-compute old (stale) sorts. */
-    flags |= c->sorted;
+    /* Clear stale sorts. */
     c->sorted = 0;
   } else {
     /* Ignore dimensions that are already sorted. */
-- 
GitLab