Skip to content

Record performance re-audit results for multispectral#1418

Open
brendancol wants to merge 1 commit intomainfrom
perf-reaudit-multispectral-2026-05-02
Open

Record performance re-audit results for multispectral#1418
brendancol wants to merge 1 commit intomainfrom
perf-reaudit-multispectral-2026-05-02

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

Notes recorded

  • MEDIUM: _true_color_dask and _true_color_dask_cupy use da.stack on the band axis without rechunk, producing chunks of size 1 along that axis. With 4 bands the impact is scheduling overhead only.
  • LOW: _true_color_numpy allocates np.zeros((h, w, 4)) before fully overwriting all four channels; np.empty would suffice.
  • All 17 index functions use plain map_blocks with no halo. An 8192x8192 ndvi graph is 80 tasks; evi/arvi/ebbi 112 tasks.

Test plan

  • CSV row parses with csv.DictReader/DictWriter.
  • Graph audit script /tmp/multispectral_graph_1.py builds (never computes) ndvi/evi/arvi/msavi2/savi/ebbi/true_color graphs and reports linear task counts.

Re-audited multispectral after PRs 1292 (true_color memory guard) and
1301 (validate_arrays in true_color). Verdict remains SAFE / compute-
bound, no HIGH findings.

Notes:
- MEDIUM: _true_color_dask and _true_color_dask_cupy use da.stack on
  the band axis without rechunk, producing chunks of size 1 along that
  axis. With 4 bands the impact is scheduling overhead only.
- LOW: _true_color_numpy allocates np.zeros((h,w,4)) before fully
  overwriting all four channels; np.empty would suffice.
- All 17 index functions use plain map_blocks with no halo. An
  8192x8192 ndvi graph is 80 tasks, evi/arvi/ebbi 112 tasks.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant