Repository navigation
Afterglow v1.4.0 — ThreadPool & Architecture Cleanup
What's New
High-Performance ThreadPool
替换所有散装线程管理,统一为自研高性能线程池。
- 3 优先级车道: High / Normal / Low,visible 缩略图走 High 优先解码
- Spin-Yield-Wait 空闲策略: spin 64 次 →
_mm_pauseyield 256 次 → CV wait,减少 ~90% syscall 开销 - Cache-line 对齐:
alignas(64)防止 false sharing - 批量提交:
SubmitBatch一次加锁 +notify_all,减少唤醒开销 - 自动线程数:
hardware_concurrency() - 1(保留一个核给渲染线程)
ImagePipeline 重构
- 5 个散装线程(1 load + 4 thumbnail workers)→ 1 个统一线程池
- 3 个 mutex(requestMutex_ / visibleMutex_ / queueMutex_)→ 1 个 cacheMutex_
- readyQueue:
vector::erase(begin, begin+n)O(n) →deque::pop_front()O(1) - 消除嵌套锁(requestMutex_ → visibleMutex_)死锁风险
Architecture Cleanup
删除 19 个从未使用的空壳文件(-905 行):
- D3D12Renderer(D2D 底层已走 D3D11 硬件加速,D3D12 对 2D 查看器无收益)
- TextureManager / MipMapGenerator.cpp / Viewport.cpp(真实代码在 Direct2DRenderer.cpp)
- image_processing 全模块(FilterPipeline, ColorCorrection, SharpenEngine, BatchProcessor, RAWDecoder)
- MainWindow / MetadataPanel(孤儿 UI 空壳)
- CacheManager::TextureCache 类声明
- 去掉
d3d12链接依赖
Glass Folder Header
文件夹详情页标题从不透明覆盖改为 Liquid Glass 毛玻璃渲染。
Full Changelog: v1.3.0...v1.4.0