Summary: | DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | Xiaoming Shi <xiaoming> |
Component: | Other | Assignee: | log4j-dev <log4j-dev> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Xiaoming Shi
2011-02-28 22:11:22 UTC
We faced the similar problem for performance of log4j. Basically we log a bunch of messages for each http request. Then, we found that http response time gets hits. So what we ended up was to first log each message to a StringBuffer, after some messages are logged, i.e. 100, we then call log4j api to log. This has improved the response time. However, we still see a response hit when the chunk of messages are written to file. Lily http://www.alldiscountbooks.net |