You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply the same memory optimization patterns used in operator-controller
to catalogd for consistent memory management across the codebase:
1. Add cache transform function to strip managed fields and annotations
- Removes managed fields from all cached objects
- Strips kubectl.kubernetes.io/last-applied-configuration annotations
- Applied to all catalogd informer caches
2. Pre-allocate slices with correct capacity
- localdir.go: Pre-allocate metaChans with len(storeMetaFuncs)
- garbage_collector.go: Pre-allocate removed slice with len(cacheDirEntries)
- Reduces allocations and GC pressure during catalog operations
These optimizations follow the same patterns that reduced operator-controller
memory usage by 38% and should provide similar benefits for catalogd.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments