Community
Participate
Working Groups
The current implementation of JDIThread#getTopStackFrame() calls computeStackFrames() to update the stack frame list if needed. computeStackFrames() is not a trivial method, it retrieve all stack frames and can be expensive (ReferenceTypeImpl#findMethod(MethodID) calls, see bug 24720). The implementation should be: - if the cached stack frames are valid, return the top stack frame from this cache. - otherwise, ask the vm for the top stack frame and cache the value.
Luc, please investigate if this has any real impact on performance. From what I can tell (breif look), the potentially expensice calls to #getTopStackFrame() only happen when a thread is suspended, and the UI has to render all frames anyway. Thus, in practice, I think that all frames will be retrieved anyway. We may just end up doing more calls - i.e. get the top frame, and then get all frames.
Please investigate.
Deferred
This is fixed in 3.0 - the model is populated lazily. Each stack frame has an index into the stack.
This is a dup of the first part of 16036. *** This bug has been marked as a duplicate of 16036 ***