[
https://issues.apache.org/jira/browse/LOG4NET-429?focusedWorklogId=188337&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-188337
]
ASF GitHub Bot logged work on LOG4NET-429:
------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jan/19 16:55
Start Date: 22/Jan/19 16:55
Worklog Time Spent: 10m
Work Description: davebfid commented on pull request #45: Fix performance
issue LOG4NET-429 that was introduced by LOG4NET-205
URL: https://github.com/apache/logging-log4net/pull/45
This pull request fixes the performance issue raised as LOG4NET-429. I
think it is a better solution than the potential fixes mentioned in
LOG4NET-429. Also I feel its better solution than the one proposed in pull
request 10.
The change caches 3 things:
Name
SID
When the name was looked up
When the user name is required the code performs the following checks:
If the cached SID is the same as the current user SID:
if its not then the name is looked up again.
If cached details are older than 10 seconds:
If they are then the name is looked up again.
This ensures if a user is renamed (in which case the SID remains the same
but the user name will be different) it will be no more than 10 seconds out of
date
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 188337)
Time Spent: 10m
Remaining Estimate: 0h
> Pattern with Context property causes severe slowdown
> ----------------------------------------------------
>
> Key: LOG4NET-429
> URL: https://issues.apache.org/jira/browse/LOG4NET-429
> Project: Log4net
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.2.13
> Reporter: Jonas Versén
> Assignee: Dominik Psenner
> Priority: Minor
> Labels: performance
> Attachments: LOG4NET-429-alternative.patch, LOG4NET-429.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If you use a context property in your appenders pattern, there will be a
> significant logging slowdown. In my experience anywhere from 3 to 5 times
> slower (this will depend on the appender).
> I believe that as soon as you use a context property log4net will internally
> access the windows user name even though it's not the property you want to
> access. This theory comes from the fact that printing all properties in the
> pattern (including the costly property username) compared to just printing
> one will slow down the logging with the same factor.
> I've made a stackoverflow question with more details as well
> http://stackoverflow.com/questions/22612286/using-log4net-context-properties-has-negative-impact-on-performance/
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)