Gumtree
  1. Gumtree
  2. GUMTREE-495

Workflow visual task editor performance issue

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: framework, nbi
    • Labels:
      None
    • Environment:
      Experiment application
    • Number of attachments :
      1

      Description

      When user create a fairly long list of tasks in the visual editor, the refreshing gets slow. Please see the attachment for an example of workflow created in Kowari experiment window.

        Activity

        Hide
        Tony Lam added a comment -

        One potential solution is to use Control.moveAbove(Control) or Control.moveBelow(Control) + Control.layout() to avoid total refresh.

        See: http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg09649.html

        Test code:

        public class TestWidgetOrdering {
        	public static void main(String[] args) {
        		Display display = new Display();
        		
        		Shell shell = new Shell(display);
        		shell.setLayout(new GridLayout());
        
        		final Composite holder = new Composite(shell, SWT.NONE);
        		GridDataFactory.fillDefaults().grab(true, true).applyTo(holder);
        		holder.setLayout(new FillLayout());
        		
        		final Label label1 = new Label(holder, SWT.NONE);
        		label1.setText("1");
        		final Label label2 = new Label(holder, SWT.NONE);
        		label2.setText("2");
        		Label label3 = new Label(holder, SWT.NONE);
        		label3.setText("3");
        		Label label4 = new Label(holder, SWT.NONE);
        		label4.setText("4");
        		Label label5 = new Label(holder, SWT.NONE);
        		label5.setText("5");
        
        		
        		Button button = new Button(shell, SWT.PUSH);
        		button.setText("Move");
        		button.addSelectionListener(new SelectionAdapter() {
        			public void widgetSelected(SelectionEvent e) {
        				label1.moveBelow(label2);
        				holder.layout();
        			}
        		});
        		
        
        		shell.pack();
        		shell.open();
        		while (!shell.isDisposed()) {
        			if (!display.readAndDispatch())
        				display.sleep();
        		}
        		display.dispose();
        	}
        
        }
        
        Show
        Tony Lam added a comment - One potential solution is to use Control.moveAbove(Control) or Control.moveBelow(Control) + Control.layout() to avoid total refresh. See: http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg09649.html Test code: public class TestWidgetOrdering { public static void main( String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout( new GridLayout()); final Composite holder = new Composite(shell, SWT.NONE); GridDataFactory.fillDefaults().grab( true , true ).applyTo(holder); holder.setLayout( new FillLayout()); final Label label1 = new Label(holder, SWT.NONE); label1.setText( "1" ); final Label label2 = new Label(holder, SWT.NONE); label2.setText( "2" ); Label label3 = new Label(holder, SWT.NONE); label3.setText( "3" ); Label label4 = new Label(holder, SWT.NONE); label4.setText( "4" ); Label label5 = new Label(holder, SWT.NONE); label5.setText( "5" ); Button button = new Button(shell, SWT.PUSH); button.setText( "Move" ); button.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { label1.moveBelow(label2); holder.layout(); } }); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
        Hide
        Norman Xiong added a comment -

        Resolved by making the script much shorter.

        Show
        Norman Xiong added a comment - Resolved by making the script much shorter.

          People

          • Assignee:
            Tony Lam
            Reporter:
            Norman Xiong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: