Метод preloadOriginSettings

public

Сигнатура метода

public function preloadOriginSettings(array $templateRows): void

Возвращает: void

Описание

Batches only the copies' ORIGIN_SYSTEM_CODE/VERSION: loads them for a page of grid rows in a single query and seeds the per-template cache, so the subsequent per-row getAvailabilityForRow() reads those two settings from memory instead of issuing per-copy settings reads (NFR P95 <= 500 ms). It does not batch the rest: getAvailabilityForRow() still reads the reference row and revision from the database (getReferenceRow/getReferenceRevision, each computed once per distinct system code and cached for the service-instance lifetime) and still hashes the current logic of every modified copy (isCopyCustomized), per row. Only launched copies (SYSTEM_CODE IS NULL) can be linked to a reference; system-template rows are skipped, since getAvailabilityForRow() early-returns for them without reading settings. Every requested id is seeded (a copy without origin settings as an explicit null entry) so it does not fall back to a per-row query.

Параметры

1
Имя Тип По умолчанию Флаги
$templateRows array —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/Internal/Service/AiAgentGrid/Version/UpgradeAvailabilityService.php
Расположение метода в файле
Строки 59–84

Исходный код

PHP