Community
Participate
Working Groups
Build Identifier: 20110301-1815 Graphiti appears to be very slow because of SWT printer problems. The following exception happened a few times: java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.eclipse.ui.navigator.ProjectExplorer while still in the middle of activating part org.eclipse.ui.views.ProblemView Full stacktrace at: http://pastebin.com/NiSff2Mf The problem is the following: > at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238) > at org.eclipse.swt.internal.gtk.OS._gtk_enumerate_printers(Native Method) > at org.eclipse.swt.internal.gtk.OS.gtk_enumerate_printers(OS.java:9091) > at org.eclipse.swt.printing.Printer.getPrinterList(Printer.java:91) > at org.eclipse.gef.ui.actions.PrintAction.calculateEnabled(PrintAction.java:45) > at org.eclipse.graphiti.ui.internal.action.PrintGraphicalViewerAction.calculateEnabled(PrintGraphicalViewerAction.java:98) Printer.getPrinterList() gets called over and over again, at least once for each node one selects. And this getPrinterList function happens to be very slow on my setup (see the end), and thus the Graphiti-based editor also appears very slow. Simply returning false cures the problem. Obviously caching the correct return value would be a good solution. If one chooses "print" from Eclipse, the dialog where one chooses the printer is also very slow, but as far as I know this hasn't affected any of the other plugins notably, and also it doesn't crash. Setup: $ cat /proc/version Linux version 2.6.18-274.el5 (mockbuild@x86-002.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Fri Jul 8 17:36:59 EDT 2011 $ java -version java version "1.6.0_23" Java(TM) SE Runtime Environment (build 1.6.0_23-b05) Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode) There's quite a few printers available (20-30) at this uni, so the setup is somewhat special. These were also in frequent use at this time. Reproducible: Always
From the original forum entry: The OS is: > $ cat /proc/version > Linux version 2.6.18-274.el5 (mockbuild@x86-002.build.bos.redhat.com) (gcc > version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Fri Jul 8 17:36:59 EDT 2011
Fixed. From now on the result whether a printer is available or not will cached.
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)