You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the console output contains many lines copying (ctrl+c) the output to clipboard becomes very slow. For example try to copy 100_000 lines already lags some seconds. Seems to be O(n^2) where n is number of lines.
Example to reproduce a long console output :
public class Main {
public static void main(String[] args) {
for (int i = 0; i < 100_000; i++) {
System.out.println("org.eclipse.ui.console.TextConsoleViewer.findPosition(TextConsoleViewer.java:497)");
}
}
}
Almost all time is spend in org.eclipse.ui.console.TextConsoleViewer.findPosition(int, int, Position[])
The copied text is ~8MB:
The text was updated successfully, but these errors were encountered:
Thank you for the good report, including taking the time to profile it.
I was able to reproduce it, I will take a look.
Note: it might be good to change the test to something like this:
System.out.println("START");
for (inti = 0; i < 100_000; i++) {
System.out.println("org.eclipse.ui.console.TextConsoleViewer.findPosition(TextConsoleViewer.java:497)");
}
System.out.println("STOP");
If someone else tries to reproduce it, make sure the the "Limit console output" is not checked.
(Settings -- Run / Debug -- Console, uncheck "Limit console output")
And make sure that the text in the console and the copied text has both START and STOP.
Otherwise the output is truncated, and looks much faster than it is.
The cause is very clear the style (link) applied on TextConsoleViewer.java:497.
That is detected as a possible file + line number and converted to a link.
Adding spaces around ':' (TextConsoleViewer.java : 497) makes it fast (but, of course, breaks the links)
I am not suggesting that this is a fix :-)
If the console output contains many lines copying (ctrl+c) the output to clipboard becomes very slow. For example try to copy 100_000 lines already lags some seconds. Seems to be O(n^2) where n is number of lines.
Example to reproduce a long console output :
Almost all time is spend in org.eclipse.ui.console.TextConsoleViewer.findPosition(int, int, Position[])
The copied text is ~8MB:
The text was updated successfully, but these errors were encountered: