Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
## 2026-07-12 - Optimize renderTaskRow DOM allocations
**Learning:** Caching unattached template nodes and instantiating them via `.cloneNode(false)` reduces DOM instantiation overhead in O(N) render loops significantly.
**Action:** Apply this optimization to other hot-path rendering elements such as rows, cells, and stack containers.
## 2026-07-12 - 핫루프 내 날짜 포맷 최적화 (String.padStart 회피)
**Learning:** `String.prototype.padStart()` 메서드는 편리하지만 핫루프(예: 날짜 포맷팅) 내에서 호출될 때 불필요한 문자열 객체 할당 오버헤드를 발생시켜 성능을 저하시킵니다. 특히 대량의 WBS 데이터를 렌더링하거나 처리할 때 이러한 오버헤드는 누적됩니다.
**Action:** 성능에 민감한 핫루프 내에서 단순한 패딩 처리가 필요한 경우, 항상 인라인 삼항 연산자 기반의 문자열 연결(예: `m < 10 ? '0' + m : m`)을 사용하여 할당 비용과 함수 호출 오버헤드를 줄이세요.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
script, and requirements copies.
- Documented Kubernetes/IaC as follow-up work rather than a current
blocker for this static app.
- ⚡ Bolt: 날짜 포맷팅 함수(`formatDateInput`, `formatLocalDateInput`, `formatCompactDate`)에서 `String.prototype.padStart()` 호출을 인라인 삼항 연산자로 대체하여 메모리 할당을 최적화하고 핫루프 성능을 개선했습니다.

## [1.0.0] - 2026-04-20

Expand Down
18 changes: 13 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2684,20 +2684,28 @@ function clamp(value, min, max) {

function formatDateInput(date) {
const year = date.getUTCFullYear();
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
const day = String(date.getUTCDate()).padStart(2, '0');
const m = date.getUTCMonth() + 1;
const d = date.getUTCDate();
// ⚡ Bolt: Inline ternary avoids String.padStart() allocation overhead in hot loops.
const month = m < 10 ? '0' + m : m;
const day = d < 10 ? '0' + d : d;
return `${year}-${month}-${day}`;
}

function formatLocalDateInput(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const m = date.getMonth() + 1;
const d = date.getDate();
// ⚡ Bolt: Inline ternary string concatenation is faster than String.padStart().
const month = m < 10 ? '0' + m : m;
const day = d < 10 ? '0' + d : d;
return `${year}-${month}-${day}`;
}

function formatCompactDate(date) {
return `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}${String(date.getDate()).padStart(2, '0')}`;
const m = date.getMonth() + 1;
const d = date.getDate();
return `${date.getFullYear()}${m < 10 ? '0' + m : m}${d < 10 ? '0' + d : d}`;
Comment thread
seonghobae marked this conversation as resolved.
}

function formatPercent(value, digits) {
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<title>ScopeWeave Planner</title>
<link rel="preload" href="styles.css" as="style" />
<link rel="modulepreload" href="app.js" />
<link rel="modulepreload" href="cloud-sync.js" />
<link rel="modulepreload" href="analytics.js" />
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="toast-state.css" />
</head>
Expand Down
Loading