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 폴더 제거.
5.8 KiB
5.8 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-lanes-model | Lanes Model | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
Lanes Model
매 한 줄
"매 31-bit bitmask 로 매 scheduling priority 를 매 표현 — 매 concurrent React 의 매 심장.". React 18+ 의 매 Lanes 는 매 expiration time model 을 매 대체. 매 multiple priority 의 매 update 가 매 동시에 매 진행, 매 batch 가 매 lane group 단위. 매 2026 React 19 도 매 동일 model.
매 핵심
매 Bitmask 정의 (ReactFiberLane.js)
- 31 lanes. Bit 0 (rightmost) = 매 highest priority.
- SyncLane =
0b0000000000000000000000000000001— 매 click, input. - InputContinuousLane — 매 drag, scroll.
- DefaultLane — 매 useEffect setState 등.
- TransitionLanes (16 lanes) — 매 startTransition.
- RetryLanes — 매 Suspense retry.
- IdleLane — 매 lowest.
- OffscreenLane — 매 hidden subtree.
매 Lane 연산
- Merge:
a | b— 매 여러 update 의 매 lane 합집합. - Subset:
(a & b) === a— 매 a 가 매 b 안에. - Higher priority: 매 lower bit.
getHighestPriorityLane = lanes & -lanes. - Pending: 매 fiber.lanes / fiber.childLanes — 매 자기 + 매 subtree 의 매 pending.
매 Lifecycle
- setState →
requestUpdateLane()→ 매 lane 결정 (event type / context). markRootUpdated(root, lane)→ root.pendingLanes 에 매 OR.ensureRootIsScheduled→ 매 highest priority lane 의 매 next render schedule.performConcurrentWorkOnRoot→ 매 lane subset render. 매 yieldable.- Commit 시 매 finishedLanes 를 매 pendingLanes 에서 매 clear.
매 응용
- startTransition — 매 user input 과 매 분리.
- useDeferredValue — 매 stale value 표시.
- Suspense retry — 매 별도 lane 으로 매 burst 방지.
💻 패턴
Lane bitmask 기본
// React internal
const SyncLane = /* */ 0b0000000000000000000000000000001;
const InputContinuousLane = /* */ 0b0000000000000000000000000000100;
const DefaultLane = /* */ 0b0000000000000000000000000010000;
const TransitionLane1 = /* */ 0b0000000000000000000000001000000;
const IdleLane = /* */ 0b0010000000000000000000000000000;
const OffscreenLane = /* */ 0b0100000000000000000000000000000;
function getHighestPriorityLane(lanes) {
return lanes & -lanes; // isolate lowest set bit
}
function includesNonIdleWork(lanes) {
return (lanes & ~IdleLanes) !== 0;
}
startTransition (user code)
import { startTransition, useState } from 'react';
const [tab, setTab] = useState('home');
function select(next) {
startTransition(() => setTab(next)); // → TransitionLane
}
useDeferredValue
const [query, setQuery] = useState('');
const deferred = useDeferredValue(query); // lower priority lane
return <SearchResults q={deferred} />;
Lane assignment by event
// React internal: getCurrentEventPriority()
function eventPriorityFromEvent(eventName) {
switch (eventName) {
case 'click': case 'input': case 'submit':
return DiscreteEventPriority; // → SyncLane
case 'drag': case 'scroll': case 'mousemove':
return ContinuousEventPriority; // → InputContinuousLane
default:
return DefaultEventPriority; // → DefaultLane
}
}
Render lane subset
// performConcurrentWorkOnRoot (simplified)
function renderRootConcurrent(root, lanes) {
workInProgress = createWorkInProgress(root.current, null);
workInProgressRootRenderLanes = lanes;
while (workInProgress !== null && !shouldYield()) {
performUnitOfWork(workInProgress);
}
}
Detect priority of update (debug)
import { unstable_getCurrentPriorityLevel } from 'scheduler';
console.log(unstable_getCurrentPriorityLevel());
// 1 = Immediate, 2 = User-blocking, 3 = Normal, 4 = Low, 5 = Idle
Suspense retry lane
// When boundary catches → throw to nearest Suspense → schedule retry on RetryLane
// User code just renders <Suspense fallback={<Spin/>}><Lazy/></Suspense>
매 결정 기준
| 상황 | Lane |
|---|---|
| 매 click / input | SyncLane |
| 매 scroll / drag | InputContinuousLane |
| 매 setState in effect | DefaultLane |
| 매 startTransition | TransitionLane |
| 매 Suspense retry | RetryLane |
| 매 hidden subtree pre-render | OffscreenLane |
| 매 background prefetch | IdleLane |
기본값: 매 React 가 매 자동 선택. 매 user 는 매 startTransition / useDeferredValue 만 매 명시.
🔗 Graph
- 부모: React · React Fiber
- 변형: (legacy) · Scheduler
- 응용: startTransition · useDeferredValue · Suspense
- Adjacent: Concurrent Features · Time_Slicing
🤖 LLM 활용
언제: 매 React internal 분석, 매 perf debug, 매 transition 설계. 언제 X: 매 일반 product code — 매 자동 lane 선택 신뢰.
❌ 안티패턴
- 모든 setState 를 startTransition: 매 input 의 매 instant feedback 손실.
- useDeferredValue 의 매 너무 깊은 위치: 매 메모이제이션 풀림.
- Lane 직접 조작 시도: 매 unstable internal API.
- Sync 강제 (flushSync) 남발: 매 concurrent 이점 무.
🧪 검증 / 중복
- Verified (React 18/19 source —
ReactFiberLane.js, Andrew Clark 의 매 RFC). - 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — 매 lane bitmask + lifecycle |