From a33a879b41180bc73db83cba509f6ddf37041145 Mon Sep 17 00:00:00 2001 From: HYUNJUNGLEE Date: Fri, 8 May 2026 15:41:40 +0900 Subject: [PATCH] =?UTF-8?q?docs(CHANGELOG):=20consolidate=202026-05-08=20#?= =?UTF-8?q?11=20entries=20=E2=80=94=20wire=20=EC=A6=89=EC=8B=9C=20?= =?UTF-8?q?=ED=95=B4=EC=86=8C=20narrative=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 직전 커밋 be82843 의 \"scanvas_maker.py wire는 다음 세션\" 표현이 같은 세션 내 후속 커밋 c94b4a7 에서 무효화됐는데, CHANGELOG 본문이 정정되지 않아 같은 날짜에 모순된 두 섹션이 공존했음 (be82843 시점에서는 정확했지만 c94b4a7 이후 false). 본 커밋은 1) 두 개의 2026-05-08 섹션을 하나로 통합하고, 2) scaffold + wire 작업이 실제로는 하나의 의도된 단위(분리 사유는 prompt-injection 의심으로 인한 일시 차단) 임을 \"공정 노트\" 블록에서 명시한다. 코드는 변경 없음 (CHANGELOG.md만). immutable git history 보존: be82843, c94b4a7 commit message 자체는 수정하지 않음 (force push 회피). narrative 정정은 본 changelog 가 권위 있는 출처가 됨. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fcbecd..c0e300a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,29 +10,6 @@ --- -## 2026-05-08 (후속 — wire) - -### [feat] `scanvas_maker.py`에 `perf_block` wire 완료 (#11) - -- **수정 파일**: `scanvas_maker.py` (5곳). -- **목적**: harness/perf.py scaffold가 즉시 동작하도록 핫스팟에 `with perf_block(...)` 래핑. -- **변경 위치**: - 1. **import 블록 (~line 58)**: `from harness.perf import perf_block, set_perf_log` + ImportError 시 `@contextlib.contextmanager` 노옵 폴백. - 2. **`SCanvasApp.__init__` (~line 613)**: `set_perf_log(self.log)` 등록 — perf 측정 라인이 GUI 텍스트박스에도 표시됨. - 3. **TIN densify Phase C (line ~4430)**: `with perf_block("TIN densify Phase C (10m→1m)")` 로 10단계 점진 격자 루프 감쌈. - 4. **위성 타일 다운로드 (line ~5384)**: `with perf_block("위성 타일 다운로드+병합")` 로 `_download_xyz_tiles()` 감쌈 — 사용자 피드백 #11이 명시한 "위성지도 결합" 핫스팟. - 5. **제어맵 캡처 파이프라인 (line ~5864)**: `with perf_block("control map capture x3 + composite")` 로 textured + depth + lineart 3-stage 캡처 + composite 감쌈 (PERFORMANCE_BASELINE.md H12). -- **출력 예 (실제 측정 시)**: - ``` - [PERF] 위성 타일 다운로드+병합: wall=12340.5ms cpu=860.3ms (I/O/Net-bound) - [PERF] TIN densify Phase C (10m→1m): wall=2150.7ms cpu=2080.4ms (CPU-bound) - [PERF] control map capture x3 + composite: wall=4520.1ms cpu=3760.8ms (CPU-bound) - ``` -- **검증**: `python -m py_compile scanvas_maker.py harness/perf.py` 통과. AST parse OK. ruff는 글로벌 미설치 환경이라 다음 세션 uv install 후 검증 (`uv pip install -e ".[dev]"; ruff check`). -- **다음**: 핫스팟 H1·H7·H9·H12·H13·H18 등 추가 측정 위치 확장은 본 라운드 미적용. 사용자 실제 도면으로 한 번 측정 후 PERFORMANCE_BASELINE.md 의 "측정 후 비교 표" 채울 때 결정. - ---- - ## 2026-05-08 ### [merge] Gitea s-canvas 원격(raw upload, 184185c)과 로컬 lint+Phase 0 history 통합 @@ -43,15 +20,38 @@ - **결과**: 머지 commit `8c6d7f0`. 자동 머지된 31파일 중 README.md 만 실질 변경 (로컬 0줄 → 원격 404줄 README 흡수 — 빈 파일 vs 내용있음은 `-X ours` 적용 외 단순 합병). 나머지 source/config 28개는 로컬 lint 버전 유지. - **푸시**: 머지 후 fast-forward push 가능. 원격 history 손실 없이 통합. -### [feat] `harness/perf.py` 신규 — ms 단위 wall/CPU instrumentation (#11 scaffold) +### [feat] #11 perf instrumentation — `harness/perf.py` 신규 + `scanvas_maker.py` 5곳 wire + +> **공정 노트**: 본 항목은 두 commit 으로 디스크에 도달했음 — `be82843` (scaffold) + `c94b4a7` (wire). 중간에 prompt-injection 의심으로 wire commit 이 일시 차단됐다가 사용자 명시 권한 부여 후 같은 세션 내 후속 commit 으로 해소. `be82843` 의 commit message 와 (이전 changelog 본문) 에 남아있는 "다음 세션에 처리" 표현은 작성 시점에서는 정확했으나 후속 commit 에서 즉시 무효화됐다 — 본 항목이 정정 narrative. -- **신규 파일**: `harness/perf.py` (54 LOC) - **사용자 피드백 #11**: "로딩이 오래 걸리는 부분(위성지도 결합·구조물 빌드 시 등)은 CPU 이용률이 대폭 증가하는 프로세스를 ms 단위로 추적해서 원인을 규명하고 최적화하는 조치 필요". -- **API**: - - `perf_block(label)` — 컨텍스트 매니저. `with perf_block("XYZ tiles"): ...` 형태로 블록 실행 시간(wall + CPU)을 ms 단위로 측정. - - `set_perf_log(callable)` — 외부 sink 등록 (예: `set_perf_log(app.log)` 시 GUI 로그 패널에도 표시). -- **출력 형식**: `[PERF] {label}: wall={NNN}ms cpu={NNN}ms ({CPU|I/O/Net}-bound)`. `cpu/wall > 0.5` 면 CPU-bound로 분류. -- **상태**: scaffold만 추가. **scanvas_maker.py wire는 다음 세션** — Phase C TIN densify (line ~4430), 위성 타일 다운로드 (line ~5383), capture pipeline (line ~5864) 3개 핫스팟에 `with perf_block(...)` 래핑 예정. 현재는 dead module (이번 세션은 prompt-injection 분류로 인한 하니스 차단으로 wire 미완). + +#### 신규 모듈 — `harness/perf.py` (54 LOC, commit `be82843`) +- `perf_block(label)` — 컨텍스트 매니저. `with perf_block("XYZ tiles"): ...` 형태로 블록 실행 시간(wall + CPU)을 ms 단위로 측정. +- `set_perf_log(callable)` — 외부 sink 등록 (예: `set_perf_log(app.log)` 시 GUI 로그 패널에도 표시). +- 출력 형식: `[PERF] {label}: wall={NNN}ms cpu={NNN}ms ({CPU|I/O/Net}-bound)`. `cpu/wall > 0.5` 면 CPU-bound로 분류. + +#### Wire 5곳 — `scanvas_maker.py` (commit `c94b4a7`) +1. **import 블록 (~line 58)**: `from harness.perf import perf_block, set_perf_log` + ImportError 시 `@contextlib.contextmanager` 노옵 폴백 → `harness/` 모듈 누락 환경에서도 안전. +2. **`SCanvasApp.__init__` (~line 613)**: `set_perf_log(self.log)` 등록 — perf 측정 라인이 GUI 텍스트박스에도 표시됨. +3. **TIN densify Phase C (line ~4430)**: `with perf_block("TIN densify Phase C (10m→1m)")` 로 10단계 점진 격자 루프 감쌈 (PERFORMANCE_BASELINE.md H3). +4. **위성 타일 다운로드 (line ~5384)**: `with perf_block("위성 타일 다운로드+병합")` 로 `_download_xyz_tiles()` 감쌈 — 사용자 피드백 #11이 명시한 "위성지도 결합" 핫스팟 (H1). +5. **제어맵 캡처 파이프라인 (line ~5864)**: `with perf_block("control map capture x3 + composite")` 로 textured + depth + lineart 3-stage 캡처 + composite 감쌈 (H12). + +#### 출력 예 (실제 측정 시) +``` +[PERF] 위성 타일 다운로드+병합: wall=12340.5ms cpu=860.3ms (I/O/Net-bound) +[PERF] TIN densify Phase C (10m→1m): wall=2150.7ms cpu=2080.4ms (CPU-bound) +[PERF] control map capture x3 + composite: wall=4520.1ms cpu=3760.8ms (CPU-bound) +``` + +#### 검증 +- `python -m py_compile scanvas_maker.py harness/perf.py` 통과. AST parse OK (39 top-level statements). +- ruff Green 정식 검증은 다음 세션 (글로벌 ruff 미설치, `uv pip install -e ".[dev]"` 후 `ruff check`). + +#### 다음 라운드 (#11 추가) +- 사용자 실제 도면으로 [PERF] 출력 1회 측정 → PERFORMANCE_BASELINE.md "측정 후 비교 표" 채움. +- 측정 결과 기반 추가 hotspot wrap (H7·H9·H13·H18 등) + 최적화 (numpy 벡터화 / 스레드 풀 / GIL 해제). ---