Skip to content

Use read_block when reading slices of the entire arrays - #880

Merged
genematx merged 2 commits into
bluesky:mainfrom
genematx:read-block
May 27, 2026
Merged

Use read_block when reading slices of the entire arrays#880
genematx merged 2 commits into
bluesky:mainfrom
genematx:read-block

Conversation

@genematx

Copy link
Copy Markdown
Contributor

Use read_block methods for reading slices of array data.

Description

Motivation and Context

When reading slices of big arrays, Tiled by default calls the .read(slice=...) method, which causes databroker to fetch data for the entire array, event hough most of it may be discarded during slicing. These changes allow the server to only fetch necessary chunks.

How Has This Been Tested?

Utility functions are tested in Tiled. Full workflow is tested in a dev set-up with mounted MongoDB.

@genematx
genematx requested a review from danielballan May 27, 2026 00:07
@checkmarx-gh-ast-us-povs

checkmarx-gh-ast-us-povs Bot commented May 27, 2026

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailsf286785c-e5c3-4eaf-8389-8533a653b769


New Issues (3) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 LOW Healthcheck Instruction Missing Dockerfile: 1
detailsEnsure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working
ID: Xms5a8sBEPQOshJCpkqJ0YJNfs4%3D
2 LOW Multiple RUN, ADD, COPY, Instructions Listed Dockerfile: 5
detailsMultiple commands (RUN, COPY, ADD) should be grouped in order to reduce the number of layers.
ID: 6awWOB4YE%2FHg42fOZxUDj3%2Bg1XE%3D
3 LOW Pip install Keeping Cached Packages Dockerfile: 6
detailsWhen installing packages with pip, the '--no-cache-dir' flag should be set to make Docker images smaller
ID: ER3chhi5tocuoS0N%2FandHVECRak%3D

Fixed Issues (3) Great job! The following issues were fixed in this Pull Request
Severity Issue Source File / Package
LOW Healthcheck Instruction Missing Dockerfile: 1
LOW Multiple RUN, ADD, COPY, Instructions Listed Dockerfile: 5
LOW Pip install Keeping Cached Packages Dockerfile: 6

Communicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here.

@danielballan danielballan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against the production MongoDB

@danielballan

Copy link
Copy Markdown
Member

Oh, better bump minimum tiled version first!

@genematx
genematx merged commit b13119b into bluesky:main May 27, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants