You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2011/02/03 20:46:06 UTC

DO NOT REPLY [Bug 48778] LogMF performs slower than SLF4J in benchmark

https://issues.apache.org/bugzilla/show_bug.cgi?id=48778

--- Comment #3 from Xiaoming Shi <xi...@cs.wisc.edu> 2011-02-03 14:46:02 EST ---
Hi dude,

I find that this problem can be found in many other Apache Projects.

NumberFormat.getInstance:
 ./hadoop-0.21.0/mapred/src/java/org/apache/hadoop/mapred/FileOutputFormat.java
line: 285
./pig-0.8.0/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/MultiStorage.java
line: 241
./apache-oodt-0.1-incubating-src/workflow/src/main/java/org/apache/oodt/cas/workflow/lifecycle/WorkflowLifecycleManager.java
 line: 146
./apache-nutch-1.2/src/java/org/apache/nutch/util/TimingUtil.java   line: 44
./apache-ofbiz-10.04/framework/webapp/src/org/ofbiz/webapp/taglib/FormatTag.java
  line: 78

DateFormat.getDateTimeInstance
./hadoop-0.21.0/hdfs/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
  line:1520
./jackrabbit-2.2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java
  line:356  It’s in the critical section, so it’s more serious

./apache-ant-1.8.2/src/main/org/apache/tools/ant/taskdefs/Touch.java line:75
it uses a factory to generate the date format, and each time a date format is
created
./apache-ant-1.8.2/src/main/org/apache/tools/ant/types/resources/selectors/Date.java
 line: 141
./apache-ant-1.8.2/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
line :214
./apache-ant-1.8.2/src/main/org/apache/tools/ant/DefaultLogger.java  line:365
./apache-lenya-2.0.3-src/externals/cocoon_2_1_x/src/blocks/profiler/java/org/apache/cocoon/generation/ProfilerGenerator.java
line:191
./apache-lenya-2.0.3-src/externals/cocoon_2_1_x/src/java/org/apache/cocoon/generation/StatusGenerator.java
  line:255
./apache-ofbiz-10.04/framework/base/src/org/ofbiz/base/util/UtilDateTime.java
line:702
./apache-ofbiz-10.04/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java
line:314
./openwebbeans-1.0.0/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
line: 1598
./apache-pivot-2.0-src/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java
 line:363
./apache-pivot-2.0-src/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java 
line:281


(In reply to comment #0)
> Initially reported in http://marc.info/?l=log4j-dev&m=122893058812874&w=2
> 
> This reason for the disparity has not been determined.  I would suspect that
> passing an int as the parameter might trigger some more expensive localized
> formatting than the equivalent SLF4J call.  It would be interesting to retry
> the benchmark using a String instead of an int to see if the effect is
> dependent on the type of the parameter.  Any profiling would also be helpful to
> determine the source of the performance difference.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org