[jboss-user] [JBoss Microcontainer Development] New message: "Profiling the kernel project"

Kabir Khan do-not-reply at jboss.com
Thu Feb 11 14:11:24 EST 2010

User development,

A new message was posted in the thread "Profiling the kernel project":


Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Running a very simple benchmark for deploying a 1000 beans of type Object with no dependencies or configured properties, i.e.
   protected List<BeanMetaData> setupContexts()
      List<BeanMetaData> beans = new ArrayList<BeanMetaData>(iterations);
      for (int i = 0 ; i < iterations ; i++)
         BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean" + i, Object.class.getName());
      return beans;

shows 85% of this time to be spent in the PreInstallAction. A similar test deploying 500 beans with dependencies in the wrong order (which we know from http://community.jboss.org/message/525809#525809 is very slow) shows 25% of the time spent in PreInstallAction.
Most of the time spent in PreInstallAction comes down to adding to and reading from the BasicMetaDataRepository.retrievals map, which hits  UnmodifiableScopeKey.equals lots of times (~2M times in the 1000 beans case):
   public boolean equals(Object object)
      if (object == this)
         return true;
      if (object == null || object instanceof ScopeKey == false)
         return false;
      ScopeKey other = (ScopeKey) object;
      Scope[] otherArray = other.getArray();
      return Arrays.equals(theScopes, otherArray);

I will dig into this tomorrow and see if this can be optimized somehow, and if it is a problem in MDR I'll open another thread for that.


To reply to this message visit the message page: http://community.jboss.org/message/525867#525867

More information about the jboss-user mailing list