perf: 전투 시뮬레이터 시작 payload를 줄인다
권위 실행 context를 화면 진입 때 한 번 전달하고 준비 응답은 seed base만 반환한다. 반복별 seed 배열은 결정적 파생값으로 대체하되 구형 queue seed 우선순위와 고정 seed 동작을 보존한다.
This commit is contained in:
@@ -90,6 +90,9 @@ export interface BattleSimEnvironment {
|
||||
scenarioEffect: ScenarioEffectKey | null;
|
||||
}
|
||||
|
||||
export const buildBattleSimSeedBase = (request: Pick<BattleSimRequestPayload, 'seed'>): string | null =>
|
||||
request.seed ? null : randomUUID();
|
||||
|
||||
export const buildBattleSimEnvironment = async (
|
||||
worldState: WorldStateRow,
|
||||
profileFallback: string
|
||||
@@ -138,10 +141,11 @@ export const buildBattleSimJobPayload = async (
|
||||
profileFallback: string
|
||||
): Promise<BattleSimJobPayload> => {
|
||||
const environment = await buildBattleSimEnvironment(worldState, profileFallback);
|
||||
const seedBase = buildBattleSimSeedBase(request);
|
||||
|
||||
return {
|
||||
...request,
|
||||
seeds: request.seed ? [] : Array.from({ length: request.repeatCnt }, () => randomUUID()),
|
||||
...(seedBase ? { seedBase } : {}),
|
||||
unitSet: environment.unitSet,
|
||||
config: environment.config,
|
||||
time: {
|
||||
|
||||
Reference in New Issue
Block a user