Bug 54398

Summary: Improve AyncAppender's append performance
Product: Log4j - Now in Jira Reporter: liangly <computer1>
Component: AppenderAssignee: log4j-dev <log4j-dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Attachments: Invoke Thread.isAlive() only when buffer is full.

Description liangly 2013-01-10 03:59:09 UTC
After issue 23021, AsyncAppender.append() method will invoke dispatcher.isAlive(). However Thread.isAlive() is a expensive native method. So its better to improve the code to reduce invoking Thread.isAlive()frequency.
Comment 1 liangly 2013-01-10 05:08:14 UTC
Created attachment 29839 [details]
Invoke Thread.isAlive() only when buffer is full.