Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349059

Summary: SWT: Resize of columns lead to busy cursor
Product: z_Archived Reporter: Claudio Guglielmo <claudio.guglielmo>
Component: ScoutAssignee: Andreas Hoegger <Andreas.Hoegger>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Andreas.Hoegger, wayne.beaton, zimmermann
Version: unspecifiedFlags: zimmermann: indigo+
zimmermann: juno+
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Patch for projects rt.client and rt.ui.swt zimmermann: iplog+

Description Claudio Guglielmo CLA 2011-06-10 11:23:05 EDT
Build Identifier: 3.7.0

Resizing a table column is very slow. 

Problem: Every resize event calls AbstractTable#setColumnWidthFromUI() which saves all column preferences. Flushing those preferences (ClientUIPreferences#flush()) takes 100-200ms at my Windows Vista computer. On my windows xp computer its about 0ms -> fine.

I can think of two solutions: 

1. Propagate only the LAST resize call to the model (I do not know if that is possible)
2. Delay the saving of the preferences. It is not necessary to save them at every resize event. I would schedule a job in ClientUIPreferences#setAllTableColumnPreferences which saves the preferences 1-2 sec later (if there is not already one scheduled).
3. Do it the same way as in swing where the progatation to the model is scheduled (400ms).


Reproducible: Always

Steps to Reproduce:
1. Open swt test client
2. Open Standardview.
3. Resize a column (hold down the mouse button for several seconds)
Comment 1 Claudio Guglielmo CLA 2011-07-15 08:40:52 EDT
Created attachment 199743 [details]
Patch for projects rt.client and rt.ui.swt
Comment 2 Andreas Hoegger CLA 2011-07-15 17:25:49 EDT
Patch applied for Indigo SP1 and trunk.
Thank you Claudio
Comment 3 Wayne Beaton CLA 2011-09-20 07:38:50 EDT
The patch, if applied to the code base, must be flagged iplog+ so that it appears in the log.
Comment 4 Matthias Zimmermann CLA 2011-10-10 12:38:21 EDT
shipped with scout 3.7.1
Comment 5 Matthias Zimmermann CLA 2011-10-11 11:47:05 EDT
removed iplog flag from ticket and added iplog flag to attachment