Community
Participate
Working Groups
Create any two projects and build them. Make sure at least one is producing large build output (1000s of lines). This could be faked by just doing a cat of a big file. Then switch the selection between the project in the Project Explorer. The whole UI will block for ~ 1 second per 1000 lines of build output, every time you switch selection between projects to the project with large build output. Backtrace: Thread [main] (Suspended (breakpoint at line 4191 in StyledText)) StyledText.getLinePixel(int) line: 4191 StyledText.getPointAtOffset(int) line: 5439 StyledText.setCaretLocation() line: 8392 StyledText.setCaretOffset(int) line: 8481 BuildConsoleViewer.revealEndOfDocument() line: 120 BuildConsoleViewer.setDocument(IDocument) line: 150 BuildConsolePage.setDocument() line: 169 BuildConsolePage.selectionChanged(IWorkbenchPart, ISelection) line: 448 PageSelectionService(AbstractSelectionService).fireSelection(IWorkbenchPart, ISelection) line: 156 AbstractSelectionService$1.selectionChanged(SelectionChangedEvent) line: 62 Viewer$2.run() line: 164 SafeRunner.run(ISafeRunnable) line: 42 JFaceUtil$1.run(ISafeRunnable) line: 49 SafeRunnable.run(ISafeRunnable) line: 175 CommonViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 162 CommonViewer(StructuredViewer).updateSelection(ISelection) line: 2188 CommonViewer(StructuredViewer).handleSelect(SelectionEvent) line: 1211 CommonViewer.handleSelect(SelectionEvent) line: 478 StructuredViewer$4.widgetSelected(SelectionEvent) line: 1241 OpenStrategy.fireSelectionEvent(SelectionEvent) line: 239 OpenStrategy.access$4(OpenStrategy, SelectionEvent) line: 233 OpenStrategy$1.handleEvent(Event) line: 403 EventTable.sendEvent(Event) line: 84 Tree(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4169 Display.readAndDispatch() line: 3758 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2701 Workbench.runUI() line: 2665 Workbench.access$4(Workbench) line: 2499 Workbench$7.run() line: 679 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 668 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 124 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 353 EclipseStarter.run(String[], Runnable) line: 180 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 629 Main.basicRun(String[]) line: 584 Main.run(String[]) line: 1438 Main.main(String[]) line: 1414 This is caused solely because the CDT build console does not use fixed line height (particularly, because it wraps lines). Fix: remove the line "styledText.setWordWrap(true);" from org.eclipse.cdt.internal.ui.buildconsole.BuildConsoleViewer.BuildConsoleViewer(Composite).
This helps tremendously in my environment. Do you care to submit a patch here or in Gerrit? Still, my take is that this will require an additional preference for wrapping mode. Some of these lines in build output are unmanageable long. I would keep wrapping preference false by default because of the performance issue.
I added the preference and wrapping button to the console toolbar in bug 199605. Unfortunately a simple fix like suggested in the description won't work anymore. More analysis is needed.
I observe 2 causes of slowness. One is reported in this bug and related to wrapping. It relates to problem with StyledText reported in bug 168557. Another one is related to bug 314428 and happens when there are many problem markers associated with the console. As it stands after the changes in bug 199605 - one can disable wrapping in build console preferences and restart eclipse. That will avoid slowness related to wrapping and analogous to the fix suggested in the description. I am considering having wrapping off by default. There is a catch - it works as long as wrapping is not enabled. If a user enables it once disabling it back does not revert to the faster console. It is because StyledText.fixedLineHeight gets permanently set to false and that is not reversible.
*** cdt git genie on behalf of Andrew Gvozdev *** bug 407405 CDT Build Console blocks UI on every Project Explorer selection - set wrapping off by default to mitigate the issue. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=a1f4c57eade00bbd23b6319c7af97374f51b74db
*** Bug 535326 has been marked as a duplicate of this bug. ***
Frustratingly the toolbar item (https://bugs.eclipse.org/bugs/attachment.cgi?id=274322) for line wrapping is not persistent. To turn it off you must go to Window -> Preferences -> C/C++ -> Build -> Console and uncheck "Wrap lines in the console". Once off (due to Comment 3), restart Eclipse to get best peformance.
*** Bug 535172 has been marked as a duplicate of this bug. ***
9.5.1 is for some critical changes after Photon release. This item needs to wait until "normal" severity release.
9.5.2 is for some critical changes after Photon release. This item needs to wait until "normal" severity release.
*** Bug 537323 has been marked as a duplicate of this bug. ***
I was unrealistic targeting 9.5.3, it is still very much a priority for this year, apologies for the delay.
any news about this one ?
(In reply to Alessandro Fardin from comment #12) > any news about this one ? Coming in 9.6 - due Dec 2018. Note that the change will not make line wrapping work faster, but simply make it harder to have line wrapping on when it makes UI slow.
New Gerrit change created: https://git.eclipse.org/r/132617
Gerrit change https://git.eclipse.org/r/132617 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=39b6373f66688eadd773818da48947ce451ea8fd
Done. An entry has been added to N&N https://wiki.eclipse.org/CDT/User/NewIn96#Build