-
Notifications
You must be signed in to change notification settings - Fork 308
[Perf] High Allocator LoggingScope when no loggers #367
Comments
Would be partially resolved by aspnet/Logging#254 Before Allocations 12000 per 4k Before Bytes 448kB per 4k After Allocations 8000 per 4k After Bytes 256kB per 4k |
@davidfowl please reopen; commit Reduce logging overhead in hosting has brought this back but with even higher byte allocation. For 2003 requests Drill down on Issue aspnet/KestrelHttpServer#288 Allocations (Same as previous) Bytes (256kB per 4k -> 352kB per 4k; up 96kB) |
/cc @lodejard |
Too many cross-references, history, and screen shots! :) I can't tell how much of this is from before the current changes, or what the recommendation is. Can we discuss this in a more direct way? |
@benaadams @lodejard this still relevant? If so reopen |
Also other than |
@benaadams what are those strings? |
Header, host, path values - is what I did the StringCache for back in the day aspnet/KestrelHttpServer#411 (comment) |
Using works with null references, so this is simpler than outlined below; added change to logging to improve efficiency.
Creating a scope is expensive (at benchmarking speeds) and the techempower benchmarks specify in general requirements item 2:
For fair comparison, only create the logging scope if logging is enabled:
Add
LogLevel
ofNone = 7
?Change the following from:
To something similar to:
Ensure having no local logging scope doesn't cause issues.
The text was updated successfully, but these errors were encountered: