Hey people, I've just noticed that my fix for LOG4NET-205 (rev 1511303) causes a severe performance impact whenever someone uses the %property PatternLayout. It is fact that my fix for LOG4NET-205 turned out to be a bad one. I have three ideas how we can solve this issue:
1] revert LOG4NET-205 and add a UserNameFilter and a IdentityFilter instead 2] add a global configuration flag that allows log4net to decide whether it should populate the UserName and the Identity into the event properties dictionary 3] hack the properties dictionary to treat the UserNameProperty and the IdentityProperty specially, allowing them to be looked up and cached only when they are requested With 1 we solve the issue for good but we also drop a feature that has been introduced with 1.2.13 and thus we break backwards compatibilty. With 2 we allow people to work around the issue when they are concerned about performance but do not solve the issue for real. 3 is the best solution here, but introduces a dirty hack. Does someone have a better idea? What solution would you prefer? Cheers