Home / Market / weather pipeline performance diagnosis

weather pipeline performance diagnosis

Diagnose slow weather-data workflows by measuring discovery, transfer, parsing, scientific processing, and rendering separately before changing code.

skill★ 509210 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: weather-pipeline-performance-diagnosis description: "Diagnose slow weather-data workflows by measuring discovery, transfer, parsing, scientific processing, and rendering separately before changing code." category: data risk: safe source: self source_type: self date_added: "2026-09-24" author: ShianMike tags: [weather, performance, profiling, diagnostics, pipelines] tools: [claude, cursor, gemini, codex]

---

Weather Pipeline Performance Diagnosis

Overview

Find the stage that actually makes a weather workflow slow before optimizing it. Measure the real runtime path from source discovery through the final artifact, including optional companion data and fallback work.

This skill diagnoses latency and throughput. It does not prescribe a particular data provider, file format, decoder, or optimization.

When to Use This Skill

the real cost.

Do not activate this skill for a correctness bug unless performance is also part of the observed failure.

Reproduce the Real Path

Record one fixed workload before editing code:

Use the same workload for the baseline and candidate measurement. A faster run with fewer inputs or a warm cache is not evidence that the original path improved.

Divide the Pipeline into Stages

At minimum, time these boundaries independently:

  1. request validation and source discovery;
  2. availability checks and fallback selection;
  3. network transfer or cache read;
  4. parsing or decoding;
  5. supplemental-data retrieval;
  6. profile, grid, or derived-value construction;
  7. visualization or export;
  8. cleanup and final publication.

Add sub-stages only where the first pass shows meaningful time. Preserve the existing behavior while instrumenting; diagnostics must not silently disable expensive work.

Lightweight Timing Example

Use a monotonic clock and emit structured records that can be compared across runs:

import json
import time
from contextlib import contextmanager


@contextmanager
def timed_stage(name, report):
    started = time.perf_counter()
    outcome = "ok"
    try:
        yield
    except BaseException:
        outcome = "error"
        raise
    finally:
        report.append({
            "stage": name,
            "outcome": outcome,
            "seconds": round(time.perf_counter() - started, 6),
        })


timings = []
with timed_stage("source_discovery", timings):
    source = discover_source()
with timed_stage("transfer", timings):
    local_path = fetch_source(source)
with timed_stage("processing", timings):
    result = build_result(local_path)

print(json.dumps(timings, sort_keys=True))

Instrument production boundaries or the same public APIs used by production. Avoid a benchmark helper that bypasses the path users report as slow.

Interpret the Evidence

retries, provider timeouts, or repeated availability probes.

throttling, or failure to reuse a valid cache.

input volume is comparable.

profile construction, or repeated computation.

redraws, or large output dimensions.

cold starts, garbage collection, or uncontrolled parallelism.

Measure wall time, CPU time, bytes, item counts, cache state, and worker count where they explain the result. A single total duration cannot locate a bottleneck.

Validate a Fix

  1. Preserve the baseline report and environment description.
  2. Change the smallest shared cause supported by the measurements.
  3. Rerun the identical workload several times in the same cache state.
  4. Compare the affected stage, total duration, output identity, and resource

use.

  1. Run correctness tests for the changed path.
  2. Report both improvement and measurement variability.

Do not call a slowdown fixed when only a suspected backend, log message, or microbenchmark changed. Require an end-to-end result from the reported path.

Verification Checklist

Security & Safety Notes

from timing reports before sharing them.

authorization.

Common Pitfalls

Measure each boundary before changing the decoder.

Restore equivalent conditions.

path the benchmark omits. Measure the application entry point.

Inspect evidence and rerun before changing a budget.

decoder resources. Measure throughput and resource saturation together.

Limitations

with correct instrumentation.

before adding fine-grained probes.

scientific operation is necessary or meteorologically appropriate.