Skip to content

Afterglow v1.3.0 — Album Management & Transition Perf

Choose a tag to compare

@L0stInFades L0stInFades released this 10 Feb 16:34
· 10 commits to master since this release

Album Edit Mode (iOS Jiggle Management)

  • Glass 编辑/完成 toggle at top-right of Albums tab
  • Per-card sin-wave jiggle: sin(2π × 5Hz × t + φᵢ) × 1.5° with random phase offset, zero spring overhead
  • Red − delete badge on every album — spring pop-in (stiffness=600, damping=25)
  • Delete flow: badge tap → spring shrink 1→0 (400/30) → RemoveAlbumFolder in-memory surgery → no rescan
  • + add card at grid end → folder dialog → StartFullScan
  • Escape / tab switch auto-exits edit mode

Zero-Rescan Delete Architecture

hiddenAlbumPaths_.push_back(path) → SaveHiddenAlbums()
lock(scanMutex_) { scannedResults_.erase(remove_if(parent == path)) }  // O(n) single-pass
SetImagesGrouped(results)  // rebuilds Photos + Albums in one call
SaveScanCache(results)     // binary persist, single fwrite
  • FilterHiddenAlbums: unordered_set<wstring> construction O(k), per-image lookup O(1), total O(n+k)
  • Hidden albums survive rescans and restarts via %LocalAppData%/UltraImageViewer/hidden_albums.txt

Folder Transition Stutter Fix

Root cause: RequestThumbnail performs synchronous ID2D1DeviceContext::CreateBitmap (GPU upload) from persistent cache — up to 200 per frame. During folder-enter transition, RenderFolderDetail hits this path for every visible + prefetch cell on the first frame, causing 30-50ms frame spikes.

Solution — three-part pipeline deconfliction:

  1. Fast-scroll override during transition: isFastScrolling_ = true while folderTransitionActive_ — both RenderAlbumsTab and RenderFolderDetail → RenderImageGrid use GetCachedThumbnail only (hash lookup, no GPU work)
  2. Album cover fast-path: RenderAlbumsTab now gates RequestThumbnail vs GetCachedThumbnail on isFastScrolling_ — covers are already in memory cache so display is unaffected
  3. Decode pre-warming: EnterFolderDetail submits first 40 thumbnail requests before the spring animation starts — worker threads decode in parallel during the ~300ms slide, thumbnails land in readyQueue_ and get flushed on the first steady-state frame

Result: transition frames drop from ~40ms to <4ms. Thumbnails appear instantly when the slide animation completes.

Text Overflow Fix

  • albumTitleFormat_ configured with DWRITE_WORD_WRAPPING_NO_WRAP + DWRITE_TRIMMING_GRANULARITY_CHARACTER
  • Long album names truncated with ellipsis glyph at card boundary — photo count always visible

Build

  • Executable: afterglow.exe (x64, Release, /O2 /GL /LTCG)