Bug 3710

Summary: Improve source code parsing speed by only parsing souce files as-needed
Product: frysk Reporter: Rick Moseley <rmoseley>
Component: generalAssignee: Rick Moseley <rmoseley>
Status: RESOLVED FIXED    
Severity: normal CC: ajocksch, mcvet
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1633, 3392    

Description Rick Moseley 2006-12-12 21:30:08 UTC
Right now, all source files listed in the executable header are parsed at the
very beginning.  The way Adam originally envisioned it is that we should only
parse source files as we need them.  That is, parse the source file needed to
show the current stack frame and stop.  If any other stack frames are clicked
on, parse those source files and add them to the DOM as-needed.
Comment 1 Rick Moseley 2007-02-16 14:09:26 UTC
This has now been fixed in cvs head.  Source code is now only added to the DOM
on an as-needed basis, that is, as it is stepped into or a stack frame is
clicked on that requires a source file not currently in the DOM.

* DOMCommon.java: New.
* DomImage.java: Add addSource method to call parser when
  adding source element to DOM.
* TestParser.java: Call methods in DOMCommon instead of
  DOMFactory.
* DOMFactory.java: Pull static methods out and put in DOMCommon.
* fparser.java: Use methods from DOMCommon instead of
  DOMFactory.
* SourceWindow.java (generateProcStackTrace): Add logic to only
  parse source file when necessary.