Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
3 posts · #performance
Clear filters·6 min read

DailyBrief rebuilt every project card every 30 minutes, so I added a fingerprint cache
Most projects had not changed between runs, yet git log and a TODO scan ran for all of them. The hard parts were a fingerprint git status alone could not provide, and PowerShell 5.1 array quirks.
In short
- discover-projects.ps1 rebuilt every project card from scratch on each 30 minute run, including git history and a TODO scan.
- Each card now gets a fingerprint (HEAD, branch, dirty list plus the mtimes of the dirty files). If it matches the last run, the expensive fields are reused and the cheap ones are recomputed.
- Reusing a card is only safe if it serializes exactly like a fresh one, and PowerShell 5.1 made that harder than the cache itself.
#powershell#caching#git#performance
·6 min read

Removing a work folder in DailyBrief no longer triggers a full disk rescan
Saving the work-folder list used to rescan every root, even when I only removed one. The fix compares the effective root sets before and after and rescans only when a folder was gained.
In short
- Every save of the work-folder list cleared the cache and started a project discovery run plus a monitor run, including saves that only removed or switched off a folder.
- The handler now builds the effective root set before and after the save and rescans only if the new set contains a root the old one lacked.
- A removal now just saves, and the UI says its projects leave the list at the next scan, within 30 minutes.
#electron#nodejs#performance#powershell
·5 min read

DailyBrief's board file only grew, so I added a daily compactor that moves, never deletes
Every AI run in DailyBrief reads kanban.json, and that file only ever appended. A 169-line PowerShell script now moves old notes and finished tasks into an archive once a day, losslessly.
In short
- kanban.json was append-only, and every digest and AI check re-read all of it, so each run cost more than the last.
- core/compact-kanban.ps1 moves old aiNotes and tasks finished or deleted more than 30 days ago into kanban-archive.json, once a day, under the board lock.
- Nothing is deleted: items move whole with their comments and ids, the script is idempotent, and it writes the archive before it shrinks the board.
#powershell#electron#json#performance#data-retention