9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
4.7 KiB
4.7 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-high-resolution-time | High Resolution Time | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
High Resolution Time
매 한 줄
"매 sub-millisecond 정밀도의 매 monotonic clock". W3C High Resolution Time spec —
performance.now()가 매Date.now()의 ms 한계 + wall-clock jitter 를 매 해결. 매 Spectre 후 — 모든 brower 가 매 timer 정밀도를 매 100µs ~ 1ms 로 매 reduce + cross-origin isolation 으로 매 5µs 회복.
매 핵심
매 vs Date.now
Date.now(): wall clock, ms 단위, NTP 으로 점프 가능 (음수 delta!).performance.now(): monotonic, fractional ms, navigation start 기준.
매 timer attack mitigation
- Spectre/Meltdown (2018) → 매 brower 가 timer fuzz/round.
- Default: 100µs ~ 1ms rounding + jitter.
- COOP+COEP (cross-origin isolated) 시 → 5µs 정밀 +
SharedArrayBuffer.
매 응용
- Animation frame timing (
rAFcallback). - Performance profiling (
User Timing API). - WebGL/WebGPU frame budget tracking.
- Audio scheduling (
AudioContext.currentTime동기).
💻 패턴
Basic timing
const t0 = performance.now();
heavyWork();
const elapsed = performance.now() - t0;
console.log(`took ${elapsed.toFixed(3)} ms`); // 12.345 ms
User Timing API (DevTools 표시)
performance.mark('render-start');
render();
performance.mark('render-end');
performance.measure('render', 'render-start', 'render-end');
const [m] = performance.getEntriesByName('render');
console.log(m.duration);
// Visible in Chrome DevTools Performance panel.
Frame budget tracker
let lastT = performance.now();
function frame(now) {
const dt = now - lastT;
lastT = now;
if (dt > 16.7) console.warn(`slow frame: ${dt.toFixed(1)}ms`);
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
Cross-origin isolated (max precision)
# Server response headers
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
if (crossOriginIsolated) {
// performance.now() granularity ~5µs
// SharedArrayBuffer 가능
}
POSIX equivalent (C)
#include <time.h>
struct timespec t0, t1;
clock_gettime(CLOCK_MONOTONIC, &t0);
do_work();
clock_gettime(CLOCK_MONOTONIC, &t1);
double elapsed_ns = (t1.tv_sec - t0.tv_sec) * 1e9 + (t1.tv_nsec - t0.tv_nsec);
Rust std (cross-platform)
use std::time::Instant;
let t0 = Instant::now();
heavy_work();
println!("took {:?}", t0.elapsed()); // sub-ns precision on modern HW
Debounce slow timers
// If you measure dt < 0.1ms repeatedly, you're in fuzzed timer mode.
function isolatedPrecisionAvailable() {
const samples = Array.from({length: 100}, () => {
const a = performance.now(); const b = performance.now();
return b - a;
});
return samples.some(d => d > 0 && d < 0.05); // sub-100µs visible
}
매 결정 기준
| 상황 | Approach |
|---|---|
| Wall-clock event log | Date.now() / Date.toISOString() |
| Profile / micro-bench | performance.now() + User Timing |
| Frame loop | rAF callback timestamp (매 monotonic) |
| Audio sync | AudioContext.currentTime |
| Cross-origin iframe | postMessage with monotonic delta |
| Native (Linux/macOS) | clock_gettime(CLOCK_MONOTONIC) |
| Native (Windows) | QueryPerformanceCounter |
기본값: Duration 측정엔 매 monotonic. 매 Date 는 user-facing timestamp 만.
🔗 Graph
- 변형: Long Tasks
- 응용: Core Web Vitals Optimization (INP, LCP, CLS)
- Adjacent: Spectre · Cross-Origin Isolation · SharedArrayBuffer
🤖 LLM 활용
언제: 성능 측정 코드 작성, profiling, frame budget 분석. 언제 X: Persistent timestamp / event log 매 wall-clock 필요 시.
❌ 안티패턴
Date.now()for delta: NTP step 시 음수 / 점프 가능.new Date()매 hot loop: allocation cost + ms 한계.- Assuming sub-ms precision: COOP/COEP 없으면 매 1ms rounded.
- Cross-origin worker timing: postMessage 의 매 ms 단위 transmit overhead.
setTimeout으로 정밀 timing: 매 4ms+ minimum, jittery.
🧪 검증 / 중복
- Verified (W3C HR Time Level 3, MDN performance.now, Chrome timer reduction notes).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — performance.now + Spectre mitigation + COOP/COEP 5µs |