perf(B06): 54-22 S1 횡단 보기 ▲▼ 멈춤 되돌림 — 120ms 디바운스 · 종단도 한 번 · 바뀐 카드만
- 횡단 재계산 대기: 횡단 보기 120ms · 종단 보기 16ms 그대로(실시간) - 계획고 편집 반영 알림을 받은 횡단 보기는 카드만 갈아 끼움 — 종단도는 보낸 쪽이 이미 그림 - 숨은 횡단 보기는 알림 건너뜀 — 다시 보일 때 정합이 카드를 맞춤 - 재계산이 실제 값이 바뀐 측점만 돌려줌 — ▲ 한 번에 66장 전부 갈아 끼우던 것 → 3장 - 실측(sub7_검증 · 66 측점 · 540m ▲): 한 번 최장 577~585 → 58~81ms · 2.5초 길게 누적 1,468 → 236~282ms - B05 ▲: 50ms 넘는 멈춤 0 · 누른 뒤 55~67ms 반영 · 길게 누름 중 100ms 마다 따라옴 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -124,8 +124,11 @@ function preserveUserFields(
|
||||
/**
|
||||
* 전 측점 횡단을 현재 계획선으로 다시 계산해 `detail.cross_sections[].design`을 제자리 교체한다.
|
||||
* 돌려주는 값은 실제로 바뀐 측점의 누가거리 목록 — 호출한 쪽이 그 카드만 다시 그리면 된다.
|
||||
* 계획선 ▲ 한 번에 값이 바뀌는 측점은 몇 개뿐 — 전부 돌려주면 카드를 다 갈아 끼워 멈춤(54-22).
|
||||
*/
|
||||
export async function refreshCrossDesigns(input: CrossRefreshInput): Promise<number[]> {
|
||||
const sections = input.detail.cross_sections;
|
||||
const before = new Map(sections.map((section) => [section, JSON.stringify(section.design)]));
|
||||
const updated = refreshLocally(input) ?? (await refreshFromServer(input));
|
||||
// 구조물이 선 측점은 폐회로 면적이 정본이다 — 설계를 갈아 끼운 **이 자리에서 한 번** 다시
|
||||
// 얹는다. 부르는 쪽마다 얹으면 B06 흐름만 얹고 B05 는 안 얹어 두 보기의 유토 뱃지가
|
||||
@@ -136,7 +139,9 @@ export async function refreshCrossDesigns(input: CrossRefreshInput): Promise<num
|
||||
structureAreaRows(input.detail.cross_sections),
|
||||
);
|
||||
}
|
||||
return updated;
|
||||
return sections
|
||||
.filter((section) => JSON.stringify(section.design) !== before.get(section))
|
||||
.map((section) => section.chainage_m);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,8 @@ export function createSectionView(
|
||||
else revealCard(stationId, "smooth");
|
||||
},
|
||||
edit: () => structureEdit,
|
||||
refreshCards: (chainages) => refreshCards(chainages),
|
||||
// 종단도는 보낸 쪽(계획고 편집 반영)이 이미 다시 그림 — 카드만(54-22)
|
||||
refreshCards: (chainages) => refreshCards(chainages, false),
|
||||
},
|
||||
shared as DesignPageShared,
|
||||
);
|
||||
@@ -390,10 +391,12 @@ export function createSectionView(
|
||||
* 측점마다 `refreshCard` 를 부르면 측점 수만큼 종단 그래프·유토곡선을 다시 그려,
|
||||
* 계획선 ▲▼ 한 번에 화면이 몇 백 ms 씩 멈췄다(2026-09-12 B05 대비 느림 원인).
|
||||
*/
|
||||
const refreshCards = (chainages: ReadonlyArray<number>): void => {
|
||||
const refreshCards = (chainages: ReadonlyArray<number>, redraw = true): void => {
|
||||
let touched = false;
|
||||
for (const chainageM of chainages) if (rebuildCard(chainageM)) touched = true;
|
||||
if (touched) redrawProfile();
|
||||
if (!touched || !currentDetail) return;
|
||||
if (redraw) redrawProfile();
|
||||
else fillSlopeNotice.update(currentDetail.cross_sections, cachedStationInterval);
|
||||
};
|
||||
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
|
||||
@@ -180,7 +180,10 @@ export function createSectionProfile(
|
||||
profile: {
|
||||
onSelectStation: (stationId) => host.selectCard(cardOf(stationId)),
|
||||
callbacks: {
|
||||
onCrossDesignsUpdated: (updated) => host.refreshCards(updated),
|
||||
// 숨은 횡단 보기는 건너뜀 — 다시 보일 때 정합이 카드를 맞춤(onShow)
|
||||
onCrossDesignsUpdated: (updated) => {
|
||||
if (shared.view() === "cross") host.refreshCards(updated);
|
||||
},
|
||||
onStructureMove: (from, to, station) => {
|
||||
if (isPipeStation(station)) host.edit()?.movePipe(from, to);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user