Case studies
#powershell#debugging#windows#electron#docker#pterodactyl#python#csharp#wpf#bash#security#cpp#git#performance#ci#nodejs#pyside6#react-native
5 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
·5 min read

DailyBrief · Story
My workspace on G: was invisible to DailyBrief, and the fix exposed a 3 minute scan
Every scan root was hardcoded under the user profile, so a workspace on another drive never showed up. Making folders configurable meant fixing a walk that entered every node_modules first.
In short
- The scan roots were a hardcoded list of folders under %USERPROFILE%, so a workspace on another drive was invisible to every script.
- Get-ChildItem -Recurse entered every nodemodules and .git folder and filtered the results afterwards; the source comment in core/walk.ps1 puts that at three minutes per monitor run on G:\Desktop.
- A shared roots.ps1 now feeds every script, a pruned walk never enters dependency folders, and removing a folder no longer triggers a full rescan.
#powershell#filesystem#performance#electron
·6 min read

Movix · Story
I tried ISR for Movix, and the language cookie said no
I wanted popular watch pages served from cache. Reading a language cookie made every page dynamic, so after a restructure, a revert and a try and catch, I chose force-dynamic on purpose.
In short
- The site stores the chosen language in a cookie and reads it in the root layout and the page. Reading cookies makes a route dynamic, which collides with ISR.
- I tried a restructure, reverted it, then wrapped the cookie reads in try and catch, and decided within three minutes that this only hid the conflict.
- The final choice is force-dynamic, a deliberate trade for one server and a bounded catalog.
#nextjs#isr#caching#performance