[jboss-dev-forums] [Design the new POJO MicroContainer] - Performance problem in VFS
david.lloyd@jboss.com
do-not-reply at jboss.com
Thu Jun 14 23:32:48 EDT 2007
I was testing the jBPM web console inside of AS 5.0.0.Beta2 and I found a performance issue. It was taking around 40-50 seconds for my first request to come back, so I hooked up a profiler and discovered something interesting.
A significant fraction of this time is spent constructing really a lot of Logger instances (about 40,000-90,000 per Facelets taglib, looks like). The problem class is org.jboss.virtual.plugins.context.AbstractVirtualFileHandler, which creates a logger as an instance variable:
| protected Logger log = Logger.getLogger(getClass());
|
Presumably so that when messages are logged, they're associated with the implementation class. Still waiting for my profiler to finish, but so far, 2,225,108 instances of Logger have been constructed. That's a lot. This isn't the top item on the list of hot spots, but it's up in the top 15 or so.
The loggers should be made static. If this kind of per-class logger behavior is desired, how about using an abstract getLogger() method which initialized a protected log field on the base class.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054589#4054589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054589
More information about the jboss-dev-forums
mailing list