Repository: logging-log4net Updated Branches: refs/heads/pr/old/28 [created] fc5e1bbba
Removed the event properties in CreateCompositeProperties In order to increase the speed up operations in almost x10 times of using properties in the output when UserName and Identity information are not needed. Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/fc5e1bbb Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/fc5e1bbb Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/fc5e1bbb Branch: refs/heads/pr/old/28 Commit: fc5e1bbbacaf121628cdce7d7cf5e5d094fca365 Parents: 563311c Author: Sergii Kolbasin <[email protected]> Authored: Mon Jun 27 16:17:11 2016 +0200 Committer: Dominik Psenner <[email protected]> Committed: Thu May 25 23:19:23 2017 +0200 ---------------------------------------------------------------------- src/Core/LoggingEvent.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/fc5e1bbb/src/Core/LoggingEvent.cs ---------------------------------------------------------------------- diff --git a/src/Core/LoggingEvent.cs b/src/Core/LoggingEvent.cs index 787aa84..cae59fe 100644 --- a/src/Core/LoggingEvent.cs +++ b/src/Core/LoggingEvent.cs @@ -1335,11 +1335,15 @@ namespace log4net.Core // TODO: Add Repository Properties - // event properties + /* Event properties. PERFORMANCE ISSUE: + * The "LoggingEvent" object has this options and we are able to include them using Layout if needed. + * Initializing the "UserName" and "Identity" properties are quite expensive time cost operations. + * So please do not need to duplicate the data in the properties if no needed in order to be fast as possible. PropertiesDictionary eventProperties = new PropertiesDictionary(); eventProperties[UserNameProperty] = UserName; eventProperties[IdentityProperty] = Identity; m_compositeProperties.Add(eventProperties); + */ m_compositeProperties.Add(GlobalContext.Properties.GetReadOnlyProperties()); }
