perf(B07): 도면을 미리 받아 두고, 커서 지연과 토스트 이질감을 걷는다
도면을 열 때마다 0.8~1.0초가 걸렸다. 서버가 요청마다 도면을 새로 조립하고(0.3~0.6초), 구조물 모듈이 공유 캐시를 건너뛰고 종횡단 상세를 매번 다시 받았기 때문이다(0.2초). 진입 후 첫 장을 띄우고 나서 목록 전체를 배경에서 받아 캐시에 담고, 구조물 모듈은 B05·B06과 같은 Section_Store를 쓴다. 클릭에서 렌더까지 55~65ms로 줄었다. CAD 알림은 react-toastify라 프로젝트 공용 토스트와 모양이 달랐다. 호출부 30여 곳을 그대로 두려고 vite alias로 라이브러리 자리에 다리를 끼워, 부모가 있으면 메시지로 넘겨 부모 토스트로 띄운다. 백업 되살리기처럼 누르는 안내를 위해 showToast에 onClick을 더했다. 커서가 미묘하게 끌리던 것은 프레임이 느려서가 아니라(16.7ms, 60fps) 합성 파이프라인 때문이다. 화면 캔버스를 desynchronized+alpha:false로 만들어 그 큐를 건너뛴다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* ========================================================================== */
|
||||
|
||||
import type { CrossSection } from "../B06_Section/B06_Section_Api_Fetch";
|
||||
import { fetchSectionDetail } from "../B06_Section/B06_Section_Api_Fetch";
|
||||
import { loadSectionDetail } from "../B06_Section/B06_Section_Section_Store";
|
||||
import { appendBoxOverlay } from "../B06_Section/B06_Section_UI_Cross_Box";
|
||||
import {
|
||||
computeBoxLayout,
|
||||
@@ -438,7 +438,9 @@ export async function appendStructureEntities(
|
||||
if (!placements.length) return 0;
|
||||
let sections: CrossSection[];
|
||||
try {
|
||||
sections = (await fetchSectionDetail(projectId, routeId)).cross_sections;
|
||||
// B05·B06과 같은 공유 캐시를 쓴다 — 도면마다 새로 받으면 장을 넘길 때마다
|
||||
// 종횡단 상세를 다시 내려받아 0.2초씩 더 걸린다(2026-08-30 실측).
|
||||
sections = (await loadSectionDetail(projectId, routeId)).cross_sections;
|
||||
} catch {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user