FreeAndNil opened a new pull request, #323:
URL: https://github.com/apache/logging-log4net/pull/323
## Fixed
- **Logical stack brought back old frames**, audit da18b6fd-f044
- `Dispose` used the copy of the stack made at `Push` time
- after `Clear`, or after two `Pop` calls, the old frames came back
- it now cuts the stack that is in use and never adds to it
- known limit: disposing a frame of another flow cuts this flow, so frames
can be lost, but
nothing is added
- **A second `Fix` opened the event cache again**, audit da18b6fd-f039
- the cache was opened before we knew if there was anything to fix
- another thread could then write its own identity, thread name or
location into the event
- before the fix: one hit after 56000 to 63000 calls, five runs of five.
After: none in 2000000
## Deprecated
- `log4net.Util.TwoArgAction`, the old callback of the stack, now unused, to
be removed in v4
## Documented, not changed
- **`%property` in a `PatternString`-typed setting**, audit da18b6fd-f021
- a path built from such a value is the operator's choice, see the model
and the FAQ on path
traversal
- cleaning the value in the converter would change it everywhere, and in
the wrong place
- **`AspNetTraceAppender` belongs to one request**, audit da18b6fd-f006
- behind a buffering appender, a flush writes into the request that caused
it
- dropping older events instead would lose them, which is worse
## Speed of the stack change
1M calls, best of 5, Release on net10.0:
| case | before | after |
|---|---|---|
| push and dispose, depth 1 | 405 to 438 ns, 1272 B | 412 to 458 ns, 1272 B |
| push and dispose, depth 3 | 1386 to 1433 ns, 3976 B | 1414 to 1440 ns,
3976 B |
| dispose after Clear | 548 ns, 1656 B | 361 ns, 1016 B |
The normal cases are the same within noise and use the same memory. The
fixed case is 34 percent
faster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]