if dirty_roi == maximum_roi:
// Optimize the common case:
// Everything is dirty, so no need to loop
self._block_data = {}self._block_locks = {}
else:
// FIXME: This is O(N) for now.
// We should speed this up by maintaining a bookkeeping data structure in execute().
for block_roi in self._block_data.keys():
After Change
self._block_data[block_roi] = block
self._last_access_times[block_roi] = time.time()
def propagateDirty(self, slot, subindex, roi):
dirty_roi = self._standardize_roi( roi.start, roi.stop )
maximum_roi = roiFromShape(self.Input.meta.shape)
maximum_roi = self._standardize_roi( *maximum_roi )
if dirty_roi == maximum_roi:
// Optimize the common case:
// Everything is dirty, so no need to loop
self._resetBlocks()
else:
// FIXME: This is O(N) for now.
// We should speed this up by maintaining a bookkeeping data structure in execute().
for block_roi in self._block_data.keys():