From af88a0cd2aa7d15d9b0dca1ce369060284551de7 Mon Sep 17 00:00:00 2001 From: Chris Allan Date: Wed, 19 Jun 2024 13:05:51 +0000 Subject: [PATCH] Batch by MAX_TABLE_DOWNLOAD_ROWS We will be loading `MAX_TABLE_DOWNLOAD_ROWS` into memory and presenting it for download, it makes sense that batching happens at the same scale. With ome/omero-web#554 this is less of a concern but it makes sense to unify. In the near future it may be pertinent to remove the client side batching and "lazy" semantics entirely as they no longer really make sense or are completely unused. --- omeroweb/webgateway/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omeroweb/webgateway/views.py b/omeroweb/webgateway/views.py index 2b25b9a092..2d28d77f8f 100644 --- a/omeroweb/webgateway/views.py +++ b/omeroweb/webgateway/views.py @@ -3008,7 +3008,7 @@ def perform_table_query( def row_generator(table, h): # hits are all consecutive rows - can load them in batches idx = 0 - batch = 1000 + batch = settings.MAX_TABLE_DOWNLOAD_ROWS while idx < len(h): batch = min(batch, len(h) - idx) res = table.slice(col_indices, h[idx : idx + batch])