diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-06 10:25:04 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-06 10:25:04 +0100 |
| commit | 83f34fb955524c09b7f3e124b97c3d4feef02a0c (patch) | |
| tree | 65c7e2621ec806993fc717a22ba1688fd8b66d62 | |
| parent | 34b88141c44b7b7ea56f160d755de1d17c79e882 (diff) | |
docs: Update documentation for completed build optimization (Task C)
Updated documentation to reflect completed build system improvements:
TODO.md:
- Moved Task C to 'Recently Completed (February 6, 2026)' section
- Documented header split (asset_manager_dcl/core/utils)
- Documented asset dependency tracking (42 demo + 17 test assets)
- Noted 58% performance improvement and critical correctness bug fix
- Removed Task C from 'Critical Fixes' section (completed)
PROJECT_CONTEXT.md:
- Added 'Milestone: Build System Optimization (February 6, 2026)' section
- Detailed header refactoring strategy and asset dependency implementation
- Explained critical bug: shader changes weren't triggering rebuilds
- Documented workaround elimination (no more 'touch demo_assets.txt')
HOWTO.md:
- Added 'Build System Notes' section after developer build instructions
- Explained incremental build behavior and asset tracking
- Documented header organization (dcl/core/utils) for developers
- Clarified that all asset types (.wgsl, .spec, .obj) are tracked
All documentation now accurately reflects current build system state.
Ready to begin next task: Spectrogram Editor (HTML).
| -rw-r--r-- | PROJECT_CONTEXT.md | 3 | ||||
| -rw-r--r-- | TODO.md | 15 | ||||
| -rw-r--r-- | doc/HOWTO.md | 13 |
3 files changed, 25 insertions, 6 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index e176179..b59fdbc 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -55,6 +55,9 @@ Style: #### Milestone: Audio Lifecycle Refactor (February 5, 2026) - **Task #56: AudioEngine Implementation**: Completed 4-phase refactor to eliminate fragile initialization order dependency between synth and tracker. **Phase 1 (Design & Prototype)**: Created `AudioEngine` class and `SpectrogramResourceManager` for unified lifecycle management with lazy loading. **Phase 2 (Test Migration)**: Migrated all tracker tests to use AudioEngine (test_tracker.cc, test_tracker_timing.cc, test_variable_tempo.cc, test_wav_dump.cc). **Phase 3 (Production Integration)**: Updated main.cc to use AudioEngine, fixed pre-existing procedural texture crash (flash_cube_effect.cc, hybrid_3d_effect.cc). **Phase 4 (Cleanup & Documentation)**: Removed backwards compatibility (synth_init from audio_init), updated HOWTO.md and CONTRIBUTING.md with usage patterns. Result: All 20 tests pass, binary size impact <500 bytes, initialization fragility eliminated. +#### Milestone: Build System Optimization (February 6, 2026) +- **Task C: CMake Dependency Graph Optimization**: Resolved critical build correctness bugs and improved developer iteration speed. **Header Split**: Refactored monolithic `asset_manager.h` (61 lines) into three focused headers: `asset_manager_dcl.h` (forward declarations for AssetId), `asset_manager.h` (core GetAsset/DropAsset API), and `asset_manager_utils.h` (typed helpers for TextureAsset/MeshAsset). Updated 17 source files to use appropriate headers. **Asset Dependency Tracking**: Implemented file-level dependency tracking for all 42 demo assets and 17 test assets. CMake now correctly tracks individual `.wgsl` shaders, `.spec` audio files, and `.obj` mesh files. **Critical Bug Fixed**: Changing shader files was NOT triggering asset regeneration, resulting in stale code in binaries. Developers had to manually `touch demo_assets.txt` as workaround. Now works correctly. **Performance**: Editing TextureAsset/MeshAsset helpers improved from 4.82s to 2.01s (58% faster). Shader edits now trigger correct 3.5s rebuild (was 0.28s with no rebuild - incorrect). **Implementation**: Added `parse_asset_list()` CMake function that parses `demo_assets.txt` format (`ASSET_NAME, COMPRESSION, FILENAME, DESC`) and extracts individual file paths for dependency tracking. All 20 tests pass. Zero functionality regressions. + #### Milestone: Interactive Timeline Editor (February 5, 2026) 🎉 - **Task #57 Phase 1: Production-Ready Timeline Editor**: Created fully functional web-based editor for `demo.seq` timeline files. **Core Features**: Load/save demo.seq with BPM parsing, Gantt-style visual timeline, drag & drop sequences/effects with snap-to-beat, resize handles (left/right) allowing negative relative times, stack-order based priority system (Up/Down buttons + "Same as Above" toggle), floating auto-apply properties panel, diagonal mouse wheel scroll with 10% viewport slack, dynamic sequence bounds calculation, delete/add sequences, re-order by time. **Audio Visualization**: WAV waveform display above timeline using Web Audio API, scales with zoom (pixels per second), documented integration with `--dump_wav` flag for aligning sequences with actual demo audio output. **UI Polish**: Hoverable sequence names (large centered, fades on hover), hidden scrollbars, crosshair cursor on waveform, flash animation on active sequence change, clean minimal interface. **Bug Fixes**: Resolved critical e.target vs e.currentTarget drag offset bug, fixed sequence overlap with cumulative Y positioning, corrected effect relative time calculations. **Files**: `tools/timeline_editor/index.html` (~1200 lines pure HTML/CSS/JS, no dependencies), `README.md` (usage guide, wav_dump integration docs), `ROADMAP.md` (3 phases, 117-161 hour estimate). **Next**: Phase 1.2 (Add Effect button), Phase 2.5 (music.track visualization overlay). **Impact**: Visual timeline editing now production-ready, eliminates manual text editing for sequence placement and timing adjustments. @@ -2,6 +2,15 @@ This file tracks prioritized tasks with detailed attack plans. +## Recently Completed (February 6, 2026) + +- [x] **Task C: Build System Optimization** (February 6, 2026) + - [x] **Header Split**: Refactored `asset_manager.h` into `asset_manager_dcl.h` (forward declarations), `asset_manager.h` (core API), and `asset_manager_utils.h` (typed helpers for TextureAsset/MeshAsset). + - [x] **Asset Dependency Tracking**: Added file-level dependencies for all assets (.wgsl shaders, .spec audio, .obj meshes). CMake now tracks 42 demo assets + 17 test assets individually. + - [x] **Performance Impact**: Editing TextureAsset/MeshAsset helpers: 4.82s → 2.01s (58% faster). Editing shaders now triggers correct rebuild (was broken before - stale code bug fixed). + - [x] **Developer Workflow**: No more manual `touch demo_assets.txt` workaround needed. Edit any asset file and rebuild works correctly. + - **Result**: Critical correctness bug fixed (shader changes were not triggering rebuilds). Build system now has proper dependency tracking for all source and asset files. + ## Recently Completed (February 5, 2026) - [x] **Audio Lifecycle Refactor (Task #56)**: @@ -156,12 +165,6 @@ This file tracks prioritized tasks with detailed attack plans. - [ ] Centralize platform-specific code and `#ifdef`s into `platform.h` or equivalent. - [ ] Address `str_view()` calls that cause compilation breaks. -- [ ] **Task C: Minimal Builds with dependency graph** - - [ ] Investigate solutions for faster, minimal recompilation (dependency graph). - - [ ] Plan CMake configuration modifications. - - [ ] Implement the solution. - - [ ] Ensure Gemini/Claude are aware of and use the dependency graph. - ## Priority 2: 3D System Enhancements (Task #18) **Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry. - [x] **Task #18.0: Basic OBJ Asset Pipeline** (New) diff --git a/doc/HOWTO.md b/doc/HOWTO.md index 5af3f05..ef1f1ed 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -55,6 +55,19 @@ cmake -S . -B build -DDEMO_ALL_OPTIONS=ON cmake --build build ``` +### Build System Notes + +**Incremental Builds**: The build system tracks all source files (.cc, .h) and asset files (.wgsl shaders, .spec audio, .obj meshes) as dependencies. Editing any file will trigger the necessary rebuilds automatically. + +**Asset Dependency Tracking**: CMake tracks 42 demo assets and 17 test assets individually. Changing a shader file (e.g., `assets/final/shaders/renderer_3d.wgsl`) automatically regenerates the asset bundle and recompiles dependent files. No manual workarounds needed. + +**Header Organization**: The `asset_manager` system is split into three headers for faster incremental builds: +- `asset_manager_dcl.h`: Forward declarations (use in headers) +- `asset_manager.h`: Core API (GetAsset/DropAsset) +- `asset_manager_utils.h`: Typed helpers (TextureAsset/MeshAsset) + +Include only what you need to minimize rebuild times. + ## git cloning if you have the public ssh key authorized on the VPS, you can use |
