Bug 642416 - gwt requests can be sped up by not examining a stack trace for request names
Summary: gwt requests can be sped up by not examining a stack trace for request names
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-12 20:37 UTC by John Mazzitelli
Modified: 2014-06-27 21:07 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-27 21:07:08 UTC
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2010-10-12 20:37:10 UTC
Look in:

org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup.SessionRpcRequestBuilder.doCreate(String)

See this code:

   // TODO Don't use the expensive determineName except in dev mode
   rb.setCallback(new MonitoringRequestCallback(determineName(), rb.getCallback()));

Notice the TODO and look particularly the impl of determineName:

        public String determineName() {
            Exception e = new Exception();

            StackTraceElement[] stack = e.getStackTrace();
            // Skip the first two stack elements to get to the proxy calling
            for (int i = 2; i < stack.length; i++) {
                StackTraceElement ste = stack[i];
                // e.g. "org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTService_Proxy.findResourcesByCriteria(ResourceGWTService_Proxy.java:36)"
                if (ste.getClassName().startsWith("org.rhq.enterprise.gui.coregui.client.gwt")) {
                    return ste.getClassName().substring(ste.getClassName().lastIndexOf(".") + 1) + "."
                        + ste.getMethodName();
                }
            }
            return "unknown";
        }

This has to be expensive. We should implement the TODO at minimum (or just take out the getDetermineName's processing of the stack trace).

I don't know what the request "name" is for - but I suspect its just for logging purposes.

Comment 1 Charles Crouch 2011-05-23 20:58:44 UTC
Worth seeing if this is still relevant

Comment 2 John Mazzitelli 2011-09-26 15:29:37 UTC
i think this is also used to show the name in the stats window. not sure what we should do here. it might not be a real problem - not sure how much cpu cycles we'd save by not doing this??

Comment 3 Jay Shaughnessy 2014-06-27 21:07:08 UTC
I don't think this is an actual problem.


Note You need to log in before you can comment on or make changes to this bug.