Skip to content

Commit

Permalink
Batch by MAX_TABLE_DOWNLOAD_ROWS
Browse files Browse the repository at this point in the history
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#994 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.
  • Loading branch information
chris-allan committed Jun 19, 2024
1 parent 5a2cd79 commit 2f1a82c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omeroweb/webgateway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 2f1a82c

Please sign in to comment.