What's Changed
Bug Fixes
- Fix Windows CPU profiling extreme slowness and memory explosion (#992): The v2.1 Windows timer loop hardcoded a 1ms sampling interval regardless of the configured rate (default 10ms), generating ~10x more samples than intended and reducing
sys.setswitchintervalto 1ms causing excessive GIL contention. Now uses the actual configured sampling rate.
Improvements
- Bound memory footprint samples with reservoir sampling (#993): Replace unbounded list accumulation of memory footprint samples with
sorted_reservoir(Vitter reservoir sampling), capping memory at O(k) instead of O(n) where n is the number of malloc/free events. Eliminates unbounded memory growth during long profiling runs.
Full Changelog: v2.1.1...v2.1.2