User development,

A new message was posted in the thread "CallbackItem.changeCallback() very 
expensive due to context tracking":

http://community.jboss.org/message/527600#527600

Author  : Kabir Khan
Profile : http://community.jboss.org/people/[email protected]

Message:
--------------------------------------------------------------
> mailto:[email protected] wrote:
>  
>  
> For B I don't really understand exactly why this is being done? It looks like 
> we check for ContextTracker in each metadata level at INSTANCE level and 
> above, up to JVM. Wouldn't that be handled by the call to 
> metaData.getMetaData() in C anyway?I
Changing this to the following works, but maybe we aren't using context 
tracking in the kernel tests?
   public ContextTracker getContextTracker()
   {
      if (tracker == null || tracker == NOOP)
      {
         synchronized (this)
         {
            // since we got through, we must be the same caller
            if (tracker == NOOP)
               return null;
 
            // we waited, got through, but it's now changed
            if (tracker != null && tracker != NOOP)
               return tracker;
 
            tracker = NOOP; // mark that we're initializing
 
            ContextTracker ct = null;
            MetaData metaData = scopeInfo.getMetaData();
            if (metaData != null)
            {
               ct = metaData.getMetaData(ContextTracker.class);
//               if (ct == null)
//               {
//                  List<ScopeLevel> levels = 
CommonLevelsUtil.getSubLevels(DEFAULT_MINIMAL);
//                  int instanceIndex = levels.indexOf(CommonLevels.INSTANCE);
//                  for (int i = instanceIndex; i >= 0 && ct == null; i--)
//                  {
//                     MetaData md = metaData.getScopeMetaData(levels.get(i));
//                     if (md != null)
//                        ct = md.getMetaData(ContextTracker.class);
//                  }
//               }
            }
            tracker = ct; // should we care if it's still null?
         }
      }
      return tracker;
   }

 
 
In turn about 60% of the time taken by calling ScopeKey.getScopeLevel(). If the 
above fix is not ok, I'll need to look at optimizing that.

--------------------------------------------------------------

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


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to