| Summary: | [FlexHierarchy] InternalTreeModelViewer saveElementState and doSaveElementState hurts performance for virtual tree | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Winnie Lai <wlai> | ||||
| Component: | Debug | Assignee: | Pawel Piech <pawel.1.piech> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | mober.at+eclipse, pawel.1.piech, pchuong | ||||
| Version: | 3.7 | Keywords: | performance | ||||
| Target Milestone: | 3.7 M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Winnie Lai
I'm rather dismayed that we got this far with such a bug! It seems that we keep making subtle changes now and then that break lazy loading, which just screams for a unit test to ensure that it works properly. I'll make sure to look at it for M6. CQ:WIND00254250 Does this defect affect Eclipse 3.6.2 as well? This performance problem also exists in 3.6.x. Created attachment 189053 [details]
Patch with fix.
I committed the attached fix along with a test to verify it. My fix was to only get the item count if the item is expanded. This should not add any more updates since all expanded elements are updated, even the hidden onces. Patrick please verify whether this fix addresses your use case. The fix looks good when I test it on a register view for our own debugger. As to a related topic of save/restore tree item expand states, I find that both 3.7 latest head and 3.6.x do not handle save/restore expansion states consistently in a variable or expression view. In particular, the view is showing an expression or variable that has 3 or more levels deeps and all levels are expanded initially. When the user steps a program fast, the view eventually collapses each level of the expaned tree items and finally shows the variable in a full collapsed state. Is this behavior expected by design? Our customers have been insisting the expansion states should be fully and reliablly restored during stepping or switching call stack frames. Do your customers have the same concern that worth for submitting a bug and gets someone to look into it? (In reply to comment #7) Yes, we do have a persistent problem with this. There's a couple of bugs open on this (bug 252515, bug 302458). As far as I know there are design problems which contribute to this: 1) The restoring of top index in the tree happens to fast during the state restore cycle. I.e. the top index in the view is restored to an element, but as other elements in the tree are expanded above it, the element that should stay at the top index is moved down. 2) When stepping fast, the view may try to evaluate expressions while target is running, which usually fails. In this case the view is informed that a given expression has no children and is effectively collapsed. After that, the element is no longer expanded. The first problem is manageable and not that serious, the second problem is more interesting. The solution needs to come from the model and I tried writing a fix for it in DSF (bug 244048), but I hadn't had time to follow up on it. If you have the time to try that fix and help perfect it, it would help us all. Marking verified based on submitter's comments. (In reply to comment #8) > 1) The restoring of top index in the tree happens to fast during the state > restore cycle. I.e. the top index in the view is restored to an element, but > as other elements in the tree are expanded above it, the element that should > stay at the top index is moved down. Never mind, this one is already addressed. |