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.

No thread or memory controls are exposed in Settings. KOPR selects the safe bounded path automatically and falls back to serial processing for small jobs, one-CPU systems, insufficient RAM or scheduler initialization failure.

Fixed automatic limits

OperationMaximum concurrencyMemory policy
Masterdark/masterflat median4 threadsOne shared 192 MiB allowance
Prepared master cacheTwo recent pairs768 MiB hard ceiling and 25% of available RAM
LIGHT calibration2 threadsAdaptive per-image RAM estimate
Row reprojection2 threadsOne shared 256 MiB allowance
Sigma clipping2 threadsOne shared 256 MiB allowance
Astrometry.net batch2 external processesIsolated 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.

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.
ScenarioJobsWorkers
1 comet × 4 midnights11
1 comet × 500 epochs11
4 comets × 300 epochs44
300 comets × 4 epochs3004

Developer Planner contract

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.

Platform-neutral release validator

From the source root, run:

python3 validate_performance_release.py

The 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 --json

In 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.py

Validated 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.

OptimizationObserved result
Automatic comparison-star local disk masks on 24 Mpx / 150 starsAbout 13×
Master median, four workersAbout 3.11×
Sigma clipping, two workersAbout 2.33×
Astrometry scheduler, simulated external tasksAbout 1.98×
LIGHT calibration, two workersAbout 1.53×
Row reprojection, two workersAbout 1.66×
Fused science+saturation reprojectionAbout 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 --native

PASS_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