Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313223 - StyledText slow to update due to deferred flushing
Summary: StyledText slow to update due to deferred flushing
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.6 RC2   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 15:12 EDT by Scott Kovatch CLA
Modified: 2010-05-18 17:17 EDT (History)
1 user (show)

See Also:
Silenio_Quarti: review+
gheorghe: review+


Attachments
Fix (3.86 KB, patch)
2010-05-18 14:29 EDT, Scott Kovatch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Kovatch CLA 2010-05-17 15:12:13 EDT
I20100511-0800

The content of a StyledText doesn't keep up with your keystrokes. You can see this in CustomControlExample.

1. Launch CustomControlExample.
2. Switch to StyledText.
3. Check the HORIZONTAL_FILL and VERTICAL_FILL checkboxes.
4. Start typing at a fast pace.

The text doesn't appear immediately. It seems to take a fraction of a second for the text you just typed in to repaint. Compare with a multiline Text, where there is no noticeable delay after typing.
Comment 1 Scott Kovatch CLA 2010-05-17 15:13:16 EDT
Commenting out the line s.flushDisabled() at Composite.java:557 fixes it, so we appear to be too aggressive with the flush deferral.
Comment 2 Scott Kovatch CLA 2010-05-17 15:13:48 EDT
This is a regression, so I think we should aim to fix it for RC2.
Comment 3 Silenio Quarti CLA 2010-05-18 10:03:34 EDT
Do we need a call to NSWindow.flushWindowIfNeeded() in Shell.clearDeferFlushing()?
Comment 4 Scott Kovatch CLA 2010-05-18 13:59:22 EDT
(In reply to comment #3)
> Do we need a call to NSWindow.flushWindowIfNeeded() in
> Shell.clearDeferFlushing()?

That does appear to fix the problem. I'm doing some more testing, but it looks good.
Comment 5 Scott Kovatch CLA 2010-05-18 14:29:29 EDT
Created attachment 168992 [details]
Fix

Call flushWindowIfNeeded instead of waiting for Cocoa to do it eventually.
Comment 6 Scott Kovatch CLA 2010-05-18 17:17:37 EDT
Fixed > 20100518.