ome/bioimage-latency-benchmark

Zarr chunk access

will-moore opened this issue · 0 comments

Looking to see whether loading a different chunk would affect the zarr performance, I first tried commenting-out the accessing and slicing of a zarr chunk,

diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py
index 7336442..e38c69e 100644
--- a/benchmark/benchmark.py
+++ b/benchmark/benchmark.py
@@ -77,8 +77,8 @@ def test_zarr_chunk(benchmark, method):
 
         def run(self):
             data = self.group["0"]
-            chunks = data.chunks
-            len(data[0:chunks[0], 0:chunks[1], 0:chunks[2], 0:chunks[3], 0:chunks[4]])
+            # chunks = data.chunks
+            # len(data[0:chunks[0], 0:chunks[1], 0:chunks[2], 0:chunks[3], 0:chunks[4]])

And found that this had no significant effect on the benchmark output:

$ docker-compose run --rm benchmark -sv
...

before:

benchmark_plot_main_12_02

after:

benchmark_plot_data=self group 0

But commenting out the previous line data = self.group["0"] had the expected effect of reducing all zarr tests to 10e-5 secs.