diff --git a/sandbox/grist/engine.py b/sandbox/grist/engine.py index 1e0ccf21..33f8f120 100644 --- a/sandbox/grist/engine.py +++ b/sandbox/grist/engine.py @@ -824,19 +824,11 @@ class Engine(object): exclude.add(row_id) cleaned.append(row_id) self._recompute_done_counter += 1 - # If no particular rows were requested, and we arrive here, - # that means we made it through the whole column! For long - # columns, it is worth deleting dirty_rows in one step rather - # than discarding one cell at a time. - if require_rows is None: - cleaned = [] - dirty_rows = None - finally: self._current_node = previous_current_node - for row_id in cleaned: - # Usually dirty_rows refers to self.recompute_map[node], so this modifies both - dirty_rows.discard(row_id) + # Usually dirty_rows refers to self.recompute_map[node], so this modifies both + dirty_rows -= cleaned + # However it's possible for them to be different # (see above where `exempt` is nonempty and allow_evaluation=True) # so here we check self.recompute_map[node] directly diff --git a/sandbox/grist/lookup.py b/sandbox/grist/lookup.py index 59c78e46..abdee766 100644 --- a/sandbox/grist/lookup.py +++ b/sandbox/grist/lookup.py @@ -134,11 +134,9 @@ class BaseLookupMapColumn(column.BaseColumn): # The _use_node call both brings LookupMapColumn up-to-date, and creates a dependency on it. # Relation of None isn't valid, but it happens to be unused when there is no current_frame. - row_ids = self._row_key_map.lookup_right(key, set()) - engine._use_node(self.node, rel, row_ids) - if not row_ids: - row_ids = self._row_key_map.lookup_right(key, set()) + engine._use_node(self.node, rel) + row_ids = self._row_key_map.lookup_right(key, set()) return row_ids, rel # Override various column methods, since LookupMapColumn doesn't care to store any values. To