Bug 153674 - [Viewers] CheckBoxTreeViewer.set*Elements have major performance problems
Summary: [Viewers] CheckBoxTreeViewer.set*Elements have major performance problems
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: performance
Depends on:
Blocks: 147027
  Show dependency tree
 
Reported: 2006-08-12 16:29 EDT by Philippe Ombredanne CLA
Modified: 2019-08-08 15:19 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Ombredanne CLA 2006-08-12 16:29:04 EDT
If you select 'Convert Line Delimiters To' on a project with some large number of files, the UI freeze until all files are collected without any progress indication.
The pop-up show up after a while though .
There should be a progress monitor there IMHO
Comment 1 Dani Megert CLA 2006-08-14 13:30:46 EDT
>The pop-up show up after a while though .
I assume you mean the selection dialog.

The conversion operation correctly takes a progress monitor but the SelectResourcesDialog does not and it would not help here because the code that takes long is in
  CheckBoxTreeViewer.setCheckedElements(Object[] elements)
and
  CheckBoxTreeViewer.setGrayedElements(Object[] elements)
which do not take a progress monitor.

Test Case:
1. start fresh workspace
2. checkout 'org.eclipse.jdt.ui.refactoring.tests' from CVS
3. select it
4. File > Convert Line Delimiters To > Windows
==> you wait for some minutes (the Map that is passed to the CheckBoxTreeViewer methods has 4548 elements).

NOTE: our class (SelectResourcesBlock) that calls the CheckBoxTreeViewer is a copy of the internal ResourceTreeAndListGroup class. There is bug 147027 to make that class API.
Comment 2 Dani Megert CLA 2006-08-14 13:34:55 EDT
Restored priority and target since the bug got moved to another component.
Comment 3 Michael Scharf CLA 2006-11-02 21:47:15 EST
Here is a trick to make the CheckBoxTreeViewer.set*Elements faster:

Before populating the tree call:
   CheckBoxTreeViewer.setUseHashlookup(true);

Makes a *huge* difference for big trees
Comment 4 Dani Megert CLA 2006-11-03 02:32:53 EST
Grrr. Never copy code without reviewing it. I assumed that the copied ResourceTreeAndListGroup uses hash look up. I've now fixed this in our copy.

I suggest to fix this in Platform UI code as well (and make it API ;-).
Comment 5 Boris Bokowski CLA 2009-11-26 09:48:44 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 6 Eclipse Genie CLA 2018-12-09 13:00:31 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Lars Vogel CLA 2019-08-08 15:19:19 EDT
This bug has been marked with as "stalebug" for some time now. I mark this bug as "worksforme" to indicate that no work is planned here. 

If this bug is still relevant for the latest release, please reopen the bug and remote the "stalebug" whiteboard tag.