Issue Description
I'm experiencing significant performance issues when using the CallStack enricher with deep call stacks containing more than 50 frames. The enricher seems to process each frame individually without any optimization.
Environment
- Serilog.Enrichers.CallStack: v1.0.353
- .NET 6.0
- Windows 11
Expected Behavior
Call stack enrichment should maintain reasonable performance even with deep stacks.
Actual Behavior
Processing time increases exponentially with stack depth. With 100+ frame stacks, enrichment takes >500ms.
Reproduction Code
Log.Logger = new LoggerConfiguration()
.Enrich.WithCallStack()
.WriteTo.Console()
.CreateLogger();
// Deep recursion scenario
RecursiveMethod(100);
Would appreciate any insights on optimization strategies or configuration options to limit stack depth.
Issue Description
I'm experiencing significant performance issues when using the CallStack enricher with deep call stacks containing more than 50 frames. The enricher seems to process each frame individually without any optimization.
Environment
Expected Behavior
Call stack enrichment should maintain reasonable performance even with deep stacks.
Actual Behavior
Processing time increases exponentially with stack depth. With 100+ frame stacks, enrichment takes >500ms.
Reproduction Code
Would appreciate any insights on optimization strategies or configuration options to limit stack depth.