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
- A fetch, sounding, map, animation, or batch job feels slower than before.
- A parser or native backend is blamed without stage-level timing evidence.
- Local runs and packaged or hosted runs have different performance.
- A cache, provider fallback, optional enrichment, or rendering step may hide
the real cost.
- A proposed performance fix needs a repeatable before-and-after comparison.
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:
- requested source, time, location, variables, and output;
- application commit and runtime version;
- active implementation or backend, including fallback reason;
- cold-cache or warm-cache state;
- machine, operating system, worker count, and relevant resource limits;
- bytes transferred and final artifact size;
- whether optional guidance, overlays, or secondary sources were enabled.
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:
- request validation and source discovery;
- availability checks and fallback selection;
- network transfer or cache read;
- parsing or decoding;
- supplemental-data retrieval;
- profile, grid, or derived-value construction;
- visualization or export;
- 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
- Long discovery with little transfer suggests broad listings, excessive
retries, provider timeouts, or repeated availability probes.
- Long transfer with expected parsing time suggests bandwidth, object size,
throttling, or failure to reuse a valid cache.
- Long parsing requires proof that the intended backend is active and that the
input volume is comparable.
- Long processing after parsing points to interpolation, secondary retrieval,
profile construction, or repeated computation.
- Long rendering can come from layout, rasterization, font loading, excessive
redraws, or large output dimensions.
- High variance across identical runs suggests external services, contention,
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
- Preserve the baseline report and environment description.
- Change the smallest shared cause supported by the measurements.
- Rerun the identical workload several times in the same cache state.
- Compare the affected stage, total duration, output identity, and resource
use.
- Run correctness tests for the changed path.
- 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
- The measured workload matches the user's slow workflow.
- Active backend and fallback state are observed, not inferred.
- Network, parsing, processing, rendering, and cleanup are separate timings.
- Cold and warm cache results are labeled.
- Optional or supplemental work remains visible.
- Baseline and candidate use equivalent inputs, outputs, and worker settings.
- The fix has correctness checks plus repeatable before-and-after evidence.
Security & Safety Notes
- Remove credentials, signed URLs, private paths, and sensitive coordinates
from timing reports before sharing them.
- Bound benchmark repetitions, downloads, concurrency, and disk usage.
- Do not disable certificate verification or safety checks to improve timing.
- Avoid profiling production services in a way that increases load without
authorization.
- Keep diagnostic logs from capturing raw private datasets unnecessarily.
Common Pitfalls
- The decoder is blamed first: Transfer or supplemental data dominates.
Measure each boundary before changing the decoder.
- The candidate looks faster: It used a warm cache or smaller request.
Restore equivalent conditions.
- A unit benchmark passes: The real application takes a fallback or render
path the benchmark omits. Measure the application entry point.
- A timing limit is raised: No stage-level regression analysis was done.
Inspect evidence and rerun before changing a budget.
- Parallelism increases latency: Workers contend for network, memory, or
decoder resources. Measure throughput and resource saturation together.
Limitations
- External-service latency and hosted-runner capacity can remain variable even
with correct instrumentation.
- Instrumentation has overhead; keep it lightweight and measure coarse stages
before adding fine-grained probes.
- This skill identifies bottlenecks but does not determine whether an expensive
scientific operation is necessary or meteorologically appropriate.
1---2name: weather-pipeline-performance-diagnosis3description: "Diagnose slow weather-data workflows by measuring discovery, transfer, parsing, scientific processing, and rendering separately before changing code."4category: data5risk: safe6source: self7source_type: self8date_added: "2026-09-24"9author: ShianMike10tags: [weather, performance, profiling, diagnostics, pipelines]11tools: [claude, cursor, gemini, codex]12metadata:13 source: https://skillmd.com/skills/francostino/weather-pipeline-performance-diagnosis14---1516# Weather Pipeline Performance Diagnosis1718## Overview1920Find the stage that actually makes a weather workflow slow before optimizing it.21Measure the real runtime path from source discovery through the final artifact,22including optional companion data and fallback work.2324This skill diagnoses latency and throughput. It does not prescribe a particular25data provider, file format, decoder, or optimization.2627## When to Use This Skill2829- A fetch, sounding, map, animation, or batch job feels slower than before.30- A parser or native backend is blamed without stage-level timing evidence.31- Local runs and packaged or hosted runs have different performance.32- A cache, provider fallback, optional enrichment, or rendering step may hide33 the real cost.34- A proposed performance fix needs a repeatable before-and-after comparison.3536Do not activate this skill for a correctness bug unless performance is also part37of the observed failure.3839## Reproduce the Real Path4041Record one fixed workload before editing code:4243- requested source, time, location, variables, and output;44- application commit and runtime version;45- active implementation or backend, including fallback reason;46- cold-cache or warm-cache state;47- machine, operating system, worker count, and relevant resource limits;48- bytes transferred and final artifact size;49- whether optional guidance, overlays, or secondary sources were enabled.5051Use the same workload for the baseline and candidate measurement. A faster run52with fewer inputs or a warm cache is not evidence that the original path53improved.5455## Divide the Pipeline into Stages5657At minimum, time these boundaries independently:58591. request validation and source discovery;602. availability checks and fallback selection;613. network transfer or cache read;624. parsing or decoding;635. supplemental-data retrieval;646. profile, grid, or derived-value construction;657. visualization or export;668. cleanup and final publication.6768Add sub-stages only where the first pass shows meaningful time. Preserve the69existing behavior while instrumenting; diagnostics must not silently disable70expensive work.7172## Lightweight Timing Example7374Use a monotonic clock and emit structured records that can be compared across75runs:7677```python78import json79import time80from contextlib import contextmanager818283@contextmanager84def timed_stage(name, report):85 started = time.perf_counter()86 outcome = "ok"87 try:88 yield89 except BaseException:90 outcome = "error"91 raise92 finally:93 report.append({94 "stage": name,95 "outcome": outcome,96 "seconds": round(time.perf_counter() - started, 6),97 })9899100timings = []101with timed_stage("source_discovery", timings):102 source = discover_source()103with timed_stage("transfer", timings):104 local_path = fetch_source(source)105with timed_stage("processing", timings):106 result = build_result(local_path)107108print(json.dumps(timings, sort_keys=True))109```110111Instrument production boundaries or the same public APIs used by production.112Avoid a benchmark helper that bypasses the path users report as slow.113114## Interpret the Evidence115116- Long discovery with little transfer suggests broad listings, excessive117 retries, provider timeouts, or repeated availability probes.118- Long transfer with expected parsing time suggests bandwidth, object size,119 throttling, or failure to reuse a valid cache.120- Long parsing requires proof that the intended backend is active and that the121 input volume is comparable.122- Long processing after parsing points to interpolation, secondary retrieval,123 profile construction, or repeated computation.124- Long rendering can come from layout, rasterization, font loading, excessive125 redraws, or large output dimensions.126- High variance across identical runs suggests external services, contention,127 cold starts, garbage collection, or uncontrolled parallelism.128129Measure wall time, CPU time, bytes, item counts, cache state, and worker count130where they explain the result. A single total duration cannot locate a131bottleneck.132133## Validate a Fix1341351. Preserve the baseline report and environment description.1362. Change the smallest shared cause supported by the measurements.1373. Rerun the identical workload several times in the same cache state.1384. Compare the affected stage, total duration, output identity, and resource139 use.1405. Run correctness tests for the changed path.1416. Report both improvement and measurement variability.142143Do not call a slowdown fixed when only a suspected backend, log message, or144microbenchmark changed. Require an end-to-end result from the reported path.145146## Verification Checklist147148- The measured workload matches the user's slow workflow.149- Active backend and fallback state are observed, not inferred.150- Network, parsing, processing, rendering, and cleanup are separate timings.151- Cold and warm cache results are labeled.152- Optional or supplemental work remains visible.153- Baseline and candidate use equivalent inputs, outputs, and worker settings.154- The fix has correctness checks plus repeatable before-and-after evidence.155156## Security & Safety Notes157158- Remove credentials, signed URLs, private paths, and sensitive coordinates159 from timing reports before sharing them.160- Bound benchmark repetitions, downloads, concurrency, and disk usage.161- Do not disable certificate verification or safety checks to improve timing.162- Avoid profiling production services in a way that increases load without163 authorization.164- Keep diagnostic logs from capturing raw private datasets unnecessarily.165166## Common Pitfalls167168- **The decoder is blamed first:** Transfer or supplemental data dominates.169 Measure each boundary before changing the decoder.170- **The candidate looks faster:** It used a warm cache or smaller request.171 Restore equivalent conditions.172- **A unit benchmark passes:** The real application takes a fallback or render173 path the benchmark omits. Measure the application entry point.174- **A timing limit is raised:** No stage-level regression analysis was done.175 Inspect evidence and rerun before changing a budget.176- **Parallelism increases latency:** Workers contend for network, memory, or177 decoder resources. Measure throughput and resource saturation together.178179## Limitations180181- External-service latency and hosted-runner capacity can remain variable even182 with correct instrumentation.183- Instrumentation has overhead; keep it lightweight and measure coarse stages184 before adding fine-grained probes.185- This skill identifies bottlenecks but does not determine whether an expensive186 scientific operation is necessary or meteorologically appropriate.