Files
ScadaBridge/tests
Joseph Doherty 8966c54508 perf(transport,management): bundle export resolves names from projections; import memoises name and connection lookups (MGT-5, TRN-11, WP6 task 6.7)
MGT-5: HandleExportBundle resolves template names against
GetTemplateStubsAsync (untracked Id/Name projection) and instance names
against the new ITemplateEngineRepository.GetInstanceNamesAsync (Id,
UniqueName) instead of GetAllTemplatesAsync (tracked full graph incl. script
bodies) + GetAllInstancesAsync (every instance with 4 child collections).
The exporter still loads the selected rows itself.
  Per export: 1 tracked multi-Include template query + 5 instance split
  queries (whole tables, tracked) -> 2 narrow untracked projections.

TRN-11 (narrow subset, BundleImporter is also WP2's file):
- Derived-template apply: owner/base root names were each a
   query (unindexable), twice per derived template;
  now one (Id, Name, IsDerived) projection into a case-insensitive index,
  falling back to the live query only when a name has no base row (the loop
  only creates/deletes derived templates, so a base hit is always current).
  N derived templates: 2N full-scan queries -> 1 projection (+ misses).
- Preview validation: the referenced-connection check memoises each target
  site's connection names (one read per site instead of per reference).
Not done here (left for the integrator / WP2 overlap): bulk-loading the
per-row by-name lookups in the main apply loops (BI:3789-4449) and the
DependencyResolver per-id seed loads.
2026-12-03 10:12:37 -05:00
..