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

Bug 204054

Summary: task editors can be slow to open with long comments
Product: z_Archived Reporter: Shawn Minto <shawn.minto>
Component: MylynAssignee: Robert Elves <robert.elves>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: daniel_megert, steffen.pingel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Shawn Minto CLA 2007-09-19 20:20:45 EDT
If long comments are entered into a task (especially ones without line breaks), it can freeze eclipse for an unknown amount of time.  If you want to test this, just make a long line of text and put it in into a new comment editor, save and close the task, then attempt to re-open it.  Just a word of warning that if you make the text too long, I have seen it take 5-10 mins to render.

This is related to the use of TextViewers to render the comments and the new comments that the user is entering.  This is the top of the stack while eclipse is frozen:   
	at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:270)
	at org.eclipse.swt.graphics.TextLayout.getLocation(TextLayout.java:1360)
	at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:4735)
	at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:6654)
	at org.eclipse.swt.custom.StyledText.reset(StyledText.java:6313)
	at org.eclipse.swt.custom.StyledText.setContent(StyledText.java:6792)
	at org.eclipse.jface.text.TextViewer.initializeWidgetContents(TextViewer.java:3289)
	at org.eclipse.jface.text.TextViewer.setVisibleDocument(TextViewer.java:3331)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2729)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:518)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:473)
	at org.eclipse.mylyn.tasks.ui.editors.TaskFormPage.addTextEditor(TaskFormPage.java:391)
Comment 1 Mik Kersten CLA 2007-09-20 01:08:50 EDT
Daniel: is line wrapping computation of this sort a known performance problem with source viewers?
Comment 2 Dani Megert CLA 2007-09-20 03:33:28 EDT
Hi Mik,

yes there were known issues in this area. Some of them have been fixed for 3.4 M2 (bug 108813, bug122158, bug 195575) and some are just Platform dependent, e.g. on Windows the graphics driver just goes nuts (bug 23406).

Also, 'long' is always relative ;-)
Comment 3 Mik Kersten CLA 2007-09-20 15:23:38 EDT
Shawn: it looks like the fix for bug 108813 will fix this.  Please reopen if you still see problems on M2.

*** This bug has been marked as a duplicate of bug 108813 ***