Performance, platform and modal ephemeris limits
KOPR uses bounded automatic scheduling for image processing and a fixed R121 modal ephemeris policy for every widget. These are internal scientific and responsiveness contracts, not user preferences.
R154 qualification boundary: headless state and regression checks passed, but interactive release readiness remains conditional until a real PyQt5 strict gate and native visual smoke pass.
Fixed automatic limits
| Operation | Maximum concurrency | Memory policy |
|---|---|---|
| Masterdark/masterflat median | 4 threads | One shared 192 MiB allowance |
| Prepared master cache | Two recent pairs | 768 MiB hard ceiling and 25% of available RAM |
| LIGHT calibration | 2 threads | Adaptive per-image RAM estimate |
| Row reprojection | 2 threads | One shared 256 MiB allowance |
| Sigma clipping | 2 threads | One shared 256 MiB allowance |
| Astrometry.net batch | 2 external processes | Isolated solver working directories |
Operational behaviour
Image-processing scheduling remains bounded and deterministic. Planner and analysis widgets use immutable Qt-free operations and background QThread runners; direct heavy work and manual QApplication.processEvents() loops are outside the protected routes.
Cancel follows cooperative shutdown. Results and caches commit transactionally so stale, failed or incomplete work cannot overwrite a current valid result.
R121 modal ephemeris matrix
Each widget receives the dynamics, output profile, scheduler and cache appropriate to its task. A heavier model is not automatically more correct for every workload.
| Widget | Dynamics | Output profile | Scheduling | Cache |
|---|---|---|---|---|
| WVisual | DE440s N-body | Astrometric position | Serial series | Memory trajectory |
| WCCD | DE440s N-body | Astrometric position | Serial series | Memory trajectory |
| WStack | DE440s N-body | Astrometric position | Serial series | Memory trajectory |
| WPlanner | DE440s N-body | Planner full | Comet intervals | Persistent validated segments |
| WLightCurves | Two-body | Photometric geometry | Missing physical coverage only; local formula/render | Canonical memory geometry |
R130 WPlanner performance boundary
- Immutable operations on the shared background QThread runner.
- One operation owns at most one spawn pool; no nested pools.
- One comet/apparition interval is one job with at most one forward and one backward integration.
- One vector Astropy frame transformation per element batch.
- Validated-segment fitting and writing are deferred through one bounded persistence worker.
- Persistence failure cannot invalidate a completed ephemeris.
| Scenario | Jobs | Workers |
|---|---|---|
| 1 comet × 4 midnights | 1 | 1 |
| 1 comet × 500 epochs | 1 | 1 |
| 4 comets × 300 epochs | 4 | 4 |
| 300 comets × 4 epochs | 300 | 4 |
R187 unified Comet Analyzer boundary
The current Analyzer uses one typed 1..N workspace and one compute/formula/view pipeline. Target navigation, channel visibility, display styles, Point size, cached Auto range and scenario serialization do not create a second analytical worker or policy identity.
- automatic X: visible observations only;
- automatic Y: visible observations plus models/formulas/Bortle within automatic X;
- Independent fit: 1..N targets;
- Shared
n: 2+ compatible targets; - scenario restore: transactional state replacement after validation;
- legacy Comparison parsing: migration-only.
Deterministic modal workload fixture
| Deterministic R121 fixture | Contract |
|---|---|
| Ordinary analytical workload | 10,000 points; local batch |
| Process threshold | 200,000 missing points |
| Point-batch bounds | 256–2,048 points |
| One 10,000-point apparition | At least 16 internal batches |
| 12 × 20-point small apparitions | One coalesced batch |
| Cosmetic redraw | Zero new physical calls |
| Planner forward interval | 500 points |
| Planner cold/warm integration count | 1 / 0 |
| Planner worker maximum | 4 while reserving one CPU |
| WStack process jobs | 0 |
The fixture is hardware-independent. It validates call counts, batch shapes, policy routing, deterministic ordering and absence of nested process pools.
Informational R121 wall-time probe
| Points | Median time on the build machine |
|---|---|
| 10 | 0.00016 s |
| 1,000 | 0.0149 s |
| 10,000 | 0.1489 s |
| 100,000 | 1.4972 s |
The 10,000-point probe created 24 deterministic internal batches, maximum 417 points, and stayed local. These measurements are not CI acceptance limits.
Platform-neutral release validator
From the source root, run:
python3 validate_performance_release.pyThe validator does not import PyQt, NumPy or Astropy. It checks the fixed worker and memory limits, absence of user-visible worker settings, thread-based numerical scheduling, required release references, clean distribution contents and the SHA-256 manifest.
For machine-readable output:
python3 validate_performance_release.py --jsonIn the QA build, the platform-neutral validator also invokes analysis_release_gate.py, which enforces the immutable-operation/QThread boundary and prevents obsolete synchronous curve paths from returning. R144 additionally requires wlightcurves_merger_release_gate.py to enforce the single-tab/single-implementation cutover.
R121 adds modal_ephemeris_release_gate.py. The performance validator now runs both this cross-widget modal gate and the existing GUI/QThread-specific analysis_release_gate.py.
python3 modal_ephemeris_release_gate.pyValidated platform contracts
Linux
R22 passed the available numerical references, thread lifecycle, atomic temporary-file handling, native subprocess contracts and clean-archive validation. Real PyQt rendering and a real solve-field execution still require a suitably equipped target system.
Native Windows
Contract tests cover CPU/RAM fallbacks, paths with spaces and Unicode, case-insensitive output-name collisions, atomic output installation, solver process creation and cancellation. A real native-Windows GUI smoke test remains required.
Windows with WSL
Contract tests cover native-solver preference, WSL fallback preflight, optional distribution selection, wslpath translation, two bounded astrometry tasks, deterministic commit order, Cancel and cleanup. A real two-process solve-field run through wsl.exe remains a target-machine acceptance step.
Informational optimization results
These values were observed during the optimization series. They depend on hardware and data and are not release gates.
| Optimization | Observed result |
|---|---|
| Automatic comparison-star local disk masks on 24 Mpx / 150 stars | About 13× |
| Master median, four workers | About 3.11× |
| Sigma clipping, two workers | About 2.33× |
| Astrometry scheduler, simulated external tasks | About 1.98× |
| LIGHT calibration, two workers | About 1.53× |
| Row reprojection, two workers | About 1.66× |
| Fused science+saturation reprojection | About 1.24× |
R156 local Fit Group rename and CSV export
Inline Fit Group rename is a registry/UI transaction and does not change observations or physical geometry. Multi-colour CSV export serializes the already calculated immutable result. It starts no analytical worker and performs no observation reload, UTC binning, ephemeris call or geometry computation.
Changing target, operands, bin width or visible-range filtering invalidates the result. Changing only Date/Delta T/r/log10(r) ordering is render-only and keeps export available.
R161 display-style performance boundary
Encoding changes, target style changes and channel Marker/Colour changes are view-only. They may rebuild Matplotlib artists and semantic legends, but do not reload observations, rebin colour indices, request geometry, start the analysis worker, refit formulas or invoke ephemerides.
Reverse-mode formula markers use sparse Matplotlib placement rather than changing formula sampling. Atomic JSON persistence occurs only for confirmed overrides and is outside the scientific compute path.
The deterministic release gate uses real Matplotlib artists and reports all 12 display checks as PASS. Full GUI qualification remains pending real PyQt5 offscreen and native execution.
R163 range-state performance boundary
Range identity comparison and invalidation are Qt-free state operations. Deliberate field editing records intent without redrawing. Style-only and fit-organization changes preserve valid limits, while coordinate-changing actions request one normal render with AUTO limits rather than a separate ephemeris or observation reload.
R164 artist-composition boundary
Point style is render-only. It may rebuild Matplotlib artists and legends but must reuse the same observation mask and coordinate arrays. Explicit z-order and the single-target formula-marker policy prevent visual ambiguity without adding computation.
R169 extends the same view-only boundary with a global observation marker size; the size is not part of scientific or range identity.
R169 point-size performance boundary
Changing Point size persists one display preference, increments the view revision and redraws the already prepared plot. It performs zero observation reloads, geometry jobs, ephemeris calls, fit recomputations, formula recomputations and range invalidations.
The current AUTO/USER range and Matplotlib zoom are preserved. Only pre/post observation artists receive the new marker size; formula markers and legend keys are not rebuilt with a different size contract.
R187 final integration performance boundary
R187 adds no scientific computation. The final gate verifies that Auto range is cached view state, scenarios reuse the current typed workspace and deprecated aliases cannot create a second worker/cache identity.
The current release evidence is 384 passed, 3 skipped and 0 failed. Real PyQt5 qualification remains pending.
Recommended target-machine acceptance
WPlanner
Record cold and warm timing for 1 comet × 4 midnights, 1 comet × 500 epochs, 4 comets × 300 epochs and 300 comets × 4 epochs; test 1/2/4-worker utilisation, Cancel during integration and deferred persistence, peak RSS, cache size and numerical comparison with R129.
WLightCurves
Confirm H0/n, dust, axes, limits, filters, multi-target rendering and channel changes do not start an analytical worker inside prepared coverage. Extend a formula interval and verify only missing T coverage is computed. Confirm the old Analyzer and Comparison routes open the same Comet Analyzer widget.
Platform evidence
Wall time, CPU utilisation and RSS are informational because hardware, operating system, dependency runtime, corpus and cache state are not portable release criteria.
Comet Analyzer R154 qualification
QT_QPA_PLATFORM=offscreen \
python3 r154_comet_analyzer_interactive_release_gate.py --require-qt
python3 r154_comet_analyzer_qt_smoke.py --nativePASS_HEADLESS is diagnostic evidence, not a release-ready result. Record the strict PASS, release_ready: true and the native visual checklist.
Compact reference
Download the R22 performance and platform reference.
Related chapters: Image Calibration & Stacking · Installation · Troubleshooting · Developer testing