E6 · Publication Volume 28

Performance Engineering

query plans, spatial indexes, level of detail, streaming and GPU use

*query plans, spatial indexes, level of detail, streaming and GPU use*

Critical request path with query, spatial index, level of detail, streaming and rendering budgets
Critical request path with query, spatial index, level of detail, streaming and rendering budgets

Learning objectives

This lesson is general and institution-neutral. It uses no real company, individual, property, project or identifiable place. Generic roles describe responsibilities only, and SYN-ARCH identifiers denote explicitly synthetic teaching evidence.

  • Frame the decision governed by query plans, spatial indexes, level of detail, streaming and GPU use.
  • Model the relevant boundaries, states and contracts before selecting an implementation.
  • Define measurable invariants, failure evidence and a safe release consequence.
  • Produce an evidence-based performance budget and representative benchmark suite from synthetic evidence and defend its trade-offs.

Decision boundary

Start with a user decision, workload population and response measure. Define what must be interactive, what may be asynchronous, what can be approximate and what must preserve full scientific detail. Allocate an end-to-end budget across request admission, metadata lookup, query, object retrieval, transformation, transfer, decoding and rendering. Select spatial indexes, partitions, tiles, levels of detail, streaming and parallel computation only after measuring the bottleneck they address. Performance changes must preserve identity, reference, units, uncertainty and selection semantics; a fast wrong subset is a failed system.

Core concepts

Throughput, latency, concurrency, capacity and efficiency answer different questions. Tail latency matters when one delayed component blocks a decision. A query plan explains access paths, cardinality estimates, joins, sorts and actual work; an index is useful only for a compatible predicate and data distribution. Level of detail trades geometric or visual fidelity for bounded cost and therefore requires an error contract. Streaming reduces initial wait by ordering useful chunks but introduces cancellation, back-pressure and partial-state semantics. Graphics-processor execution can accelerate regular parallel work while adding transfer, memory and numerical-compatibility constraints.

System model and contracts

Build a workload catalogue with operation, decision, dataset cohort, geometry and attribute distribution, spatial selectivity, concurrency, cache state, network condition, device class and correctness criteria. Draw the critical path and assign each stage an identity, input size, output size, resource use and percentile budget. Query evidence includes estimated and observed plan properties. Delivery packages declare tile hierarchy, geometric error, reduced-resolution rule and refinement behaviour. Rendering measurements separate data preparation, transfer, decode, upload, draw and interaction while retaining a reference image or geometry oracle.

Invariants and acceptance criteria

| Invariant | Test evidence | Release consequence | |---|---|---| | Every performance target names a decision, workload cohort and correctness contract. | contract test and recorded counterexample | block publication | | Optimised outputs preserve required identity, reference, units and uncertainty. | replay comparison and digest check | quarantine the artefact | | Approximation and level of detail expose declared error and refinement behaviour. | role-based acceptance trace | return the decision unresolved | | Benchmarks record versions, environment, cache state and output comparison. | failure injection and recovery record | retain the last verified version | | A validated fallback exists for optional acceleration paths. | domain review against declared evidence | record an explicit review finding |

Quantitative engineering

For sequential critical stages, end-to-end duration is approximately T=T_1+T_2+...+T_n; parallel branches contribute through the longest dependent path. Report median and tail percentiles with sample count and confidence, plus throughput and resource saturation. Spatial query selectivity, rows or chunks examined, bytes read, range requests, transferred vertices, draw calls, frame delay and cancellation waste locate different bottlenecks. Speedup is S=T_{baseline}/T_{candidate} only when outputs satisfy the same correctness contract. Warm-cache numbers never substitute for cold and invalidated measurements.

Data quality, evidence and uncertainty

Use representative and adversarial data: clustered and uniform points, simple and complex geometry, sparse and dense attributes, small and large extents, empty results, boundary intersections and changed statistics. Keep benchmark manifests, query parameters, plans, environment, cache state, versions, outputs and correctness comparisons. Profile before changing architecture, then repeat under the same workload and a holdout workload. Synthetic scale tests reveal algorithmic behaviour but cannot establish production frequency or acceptable response; those remain inputs from the actual decision context.

Interoperability and versioning

Performance contracts name operation, workload cohort, environment class, correctness requirement, percentile, threshold, observation window and failure action. Spatial subset contracts state exact versus approximate result. A level-of-detail contract declares screen or world error, refinement, clipping, attributes retained and how a user requests authoritative detail. Stream contracts define chunk order, completeness, cancellation and retry. Hardware acceleration remains behind the same scientific contract, with a validated fallback and declared numerical tolerance. Budgets are versioned with the architecture because a contract or dataset change can invalidate earlier evidence.

Security and professional responsibility

Bound expensive queries, geometry complexity, recursion, output size, concurrency and device memory to prevent resource exhaustion. Authorisation occurs before protected data is loaded into shared caches or accelerators. Timing, size and level-of-detail availability can reveal hidden extents, so compare permitted and denied paths for side-channel leakage. Cancel abandoned streams and jobs, clear sensitive buffers and isolate untrusted shader or expression input. Performance telemetry omits raw protected values while preserving operation, cohort and version evidence needed for diagnosis.

Operational workflow and observability

Observe end-to-end objectives and stage-level causes. Track query-plan changes, cardinality error, index use, cache outcome, object-range efficiency, queueing, transfer, decode, frame stability, fallback use and resource saturation by version. Regression gates replay the representative suite before release. In operation, compare current cohorts with their baseline and link an alert to a trace and exact artefact versions. Capacity changes and optimisations are decision records with before-and-after evidence, rollback criteria and correctness results; deleting detail to meet a number is not an optimisation unless the approximation was contracted.

Integration checkpoint

Connect the performance engineering artefact to the preceding volume architecture. Trace one synthetic object from source identity through the new boundary to a reviewed output, then trace one rejection or failure back to the earliest violated invariant. Update the architecture decision record with the chosen option, alternatives, assumptions, evidence, consequences, owner role, review state and triggers for reconsideration. A checkpoint passes only when another reviewer can reconstruct both the successful path and the blocked path without oral explanation.

Synthetic worked example

SYN-ARCH-10 loads a complete three-dimensional model before first interaction. The mean response appears acceptable on a small uniform fixture, but one complex region blocks review. Measurement separates an unselective spatial query, oversized object transfer and full-detail rendering. The revision adds a compatible spatial index, bounded subset, hierarchical delivery and progressive refinement while preserving a route to authoritative geometry. Cold, warm and holdout tests show improved tail response, and reference comparisons confirm identities, extents and declared geometric error remain correct.

Practice and assessment

  1. Which decision and workload population define the performance objective?
  2. Where is the measured critical path and which evidence locates it?
  3. What scientific meaning may an approximation change or preserve?
  4. How will a regression be detected and safely reversed?

Assessed artefact: an evidence-based performance budget and representative benchmark suite. Submit the artefact with its source manifest, acceptance evidence, unresolved risks and a short explanation of why one plausible alternative was not selected.

Common failure modes

  • Optimising a mean latency without inspecting tail and critical path.
  • Adding an index without matching the predicate and data distribution.
  • Benchmarking only warm caches or one convenient dataset.
  • Reducing geometry without an approximation and refinement contract.
  • Calling hardware acceleration faster without equivalent-output evidence.

Sources and further reading