Bug 132295 - [Viewers] speed up CheckedTree selection
Summary: [Viewers] speed up CheckedTree selection
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, performance
Depends on:
Blocks:
 
Reported: 2006-03-17 02:54 EST by Michael Seele CLA
Modified: 2022-02-23 03:33 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seele CLA 2006-03-17 02:54:13 EST
hi,

please speed up the selection of elements(programmatically check n elements) in a checked tree. in my tree it takes circa 2 seconds to check on all 270 elements with a button. 

i only use two lines:

this.fTreeViewer.setCheckedElements((Object[]) this.fTreeViewer.getInput());
this.fTreeViewer.setGrayedElements(new Object[0]);

is there any chance to send the check as one request to the os? imho it should be a lot of faster than send a event for every single item...
Comment 1 Steve Northover CLA 2006-03-17 10:09:19 EST
It's fast enough in pure SWT:

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class PR_132295 {
	public static void main(String[] args) {
		final Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setLayout(new FillLayout());
		final Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK);
		for (int i=0; i<270; i++) {
			TreeItem item = new TreeItem (tree, SWT.NONE);
			item.setText ("Item " + i);
		}
		shell.open();
		long t0 = System.currentTimeMillis ();
		for (int i=0; i<tree.getItemCount (); i++) {
			tree.getItem (i).setChecked (true);
		}
		long t1 = System.currentTimeMillis ();
		System.out.println ("Time: " + (t1 - t0));
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) display.sleep();
		}
		display.dispose();
	}
}
Comment 2 Boris Bokowski CLA 2009-11-26 09:52:01 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:16:35 EDT
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.
Comment 4 Eclipse Genie CLA 2022-02-23 03:33:32 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.