PSCache: simple strategies for magnificent performance
summary
Presents concrete results: using PSCache module (a dictionary/hash lookup) reduces repeated Active Directory calls by an order of magnitude — often ~20× fewer queries — and returns cached objects quickly. Demonstrates microbenchmarks with Measure-Command and tools like chronometer and Measure-Script, showing variable-scope access is ~10× slower, arraylist insertions suffer resizing at large N, while a stack keeps O(1) push time even at 100k items. The cache approach proves effective.
AI-written summary · about
chapters (12)
- 0:00PS cache and performance intro
- 1:13Computational performance basics
- 6:35Google performance terms
- 9:26PowerShell performance layers
- 13:19String reversal in PowerShell
- 18:18Measure-Command for performance
- 24:50Output suppression impact
- 29:53PowerShell upgrades and gains
- 30:40Pseudocode for optimization
- 34:57Advanced performance tools
- 41:09Introducing PS cache
- 46:31Q&A
related talks
29mCaching with PSRs
46mPSCustomObject[] vs Hashtables: The ultimate object smackdown
45mPSCustomObject vs Hashtables
44m99 Problems, but Slow PowerShell Ain't One!
46mCan we Make PowerShell… Blazingly Fast?!
01h 29mPerformance and Technique Tweaks: The Encore
38mProcrastination as a Service: Caching and Queueing
44mPowerShell and MS Graph API Advanced, from Zero to Hero
