| Summary: | [Outline] Slow TreeViewer updates | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Andre Weinand <andre_weinand> |
| Component: | UI | Assignee: | Nick Edgar <n.a.edgar> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P1 | CC: | boris |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 M9 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 42264 | ||
| Bug Blocks: | |||
Chris, can you reproduce this on your Mac in the latest build? Andre, is this still an issue in recent builds? Yes, adding a single method to OS.java takes 130 seconds if sorting is on and 0 seconds if it is off. Toggling sorting takes 130 seconds too. The problem is that appending single tree items to a tree node seems to be a O(n) operation on Mac OS X. If all items are added in one native operation it is fast. As long as the JFace tree removes and adds all tree items in certain update cases, it will be slow. Was not able to get to this for M5. JFace reuses TreeItems where possible. E.g. on a refresh, if only a single item has been added, only one TreeItem gets created. There is no SWT API for creating multiple TreeItems in one go. I20040317 1.25 GHz PowerBook Adding a single method to OS.java takes 55 secs if sorting is on and 0 secs if off. Toggling sorting in the outline for OS.java takes 100 seconds. Andre, please try this in tonights build. If not better, assign the PR to SWT. Thanks. I20040317 1.25 GHz PowerBook Adding a single method to OS.java takes 2 secs if sorting is on and 0 secs if off. Toggling sorting in the outline for OS.java takes 3 seconds. That's a 30x speed improvement! Very cool. When you add the method in the unsorted case, are you adding it to the end of the CU or the beginning? Is there a difference in performance? What about in the sorted case? Does the method get inserted at the beginning, middle, or end, and is there a difference? Andre, can we close this now? See also previous comment. marking as fixed |
M3 - open org.eclipse.swt.internal.carbon.OS in Java editor - in the outliner toggle the sort or the filter button Observe: it takes 130 seconds to update the outline (on my 800MHz PowerBook) - turn filter and sorting off - in Java editor go to the end of the method list - enter a new method void foo(); Observe: when typing the parenthesis the outliner updates reasonable fast and shows the new method. - now turn on sorting - at the end enter another new method Observe: when typing the parenthesis everything locks up for about 130 seconds