- Add size-based saving strategy to balance performance and file size
- Use -append for small changes (under 10MB) for better performance
- Rewrite entire file for large changes to prevent file bloat
- Make threshold configurable via size_threshold_mb parameter
- Enhance modification logging with full call stack tracing