It seems that +Guenther hasn't been getting the replies. Before making any changes, I'd like a reproducible test case. Increasing the number of lines by ten million at a time, things felt clunky but kinda linear up to and including:
martind@swiftboat:~$ DEBUGGING_TERMINATOR=y time terminator -e bash -c 'yes | head --lines 31001001'
2019-03-07T13:50:15.727-0800 Terminator: Java 1.8.0_171 (VM 25.171-b11, runtime 1.8.0_171-8u171-b11-1~bpo8+1-b11)
2019-03-07T13:50:15.727-0800 Terminator: Linux 3.16.0-7-amd64/amd64 x8
2019-03-07T13:50:15.727-0800 Terminator: Package 28.186.7354
2019-03-07T13:50:15.728-0800 Terminator: Revision 7354 (7354)
2019-03-07T13:50:15.728-0800 Terminator: Built 2019-03-04T11:34:11-08:00
...
305.26user 21.15system 1:16.72elapsed 425%CPU (0avgtext+0avgdata 6419112maxresident)k
0inputs+181912outputs (0major+1722012minor)pagefaults 0swaps
martind@swiftboat:~$
So 77s elapsed. This following one was the first run where things went off a cliff:
martind@swiftboat:~$ DEBUGGING_TERMINATOR=y time terminator -e bash -c 'yes | head --lines 41001001'
2019-03-07T13:51:45.868-0800 Terminator: Java 1.8.0_171 (VM 25.171-b11, runtime 1.8.0_171-8u171-b11-1~bpo8+1-b11)
...
2019-03-07T13:59:06.428-0800 Terminator: waitFor returned on PtyProcess[pid=11071,fd=-1,pty="/dev/pts/3",didExitNormally,exitValue=0]
...
2019-03-07T14:01:47.654-0800 Terminator: (hang #10) event dispatch thread unstuck after 8.34s.
4318.55user 29.91system 10:04.23elapsed 719%CPU (0avgtext+0avgdata 7431280maxresident)k
96inputs+241424outputs (1major+2177649minor)pagefaults 0swaps
martind@swiftboat:~$
I can still type happily in this browser, but every core was maxed out for, well, ten minutes. The competition took a twentieth of the time and only used maybe 1.5 cores (including for head):
martind@swiftboat:~$ /usr/lib/gnome-terminal/gnome-terminal-server --app-id my.first.Terminal & sleep 0.5; gnome-terminal --app-id my.first.Terminal -x bash -c 'yes | head --lines 41001001'; time fg
[2] 14586
/usr/lib/gnome-terminal/gnome-terminal-server --app-id my.first.Terminal
real 0m28.677s
user 0m17.760s
sys 0m19.200s
martind@swiftboat:~$
If I apply a minimal reinstatement of the previous limit:
martind@swiftboat:~/jessies/work/salma-hayek/bin$ git diff
diff --git a/salma-hayek/bin/invoke-java.rb b/salma-hayek/bin/invoke-java.rb
index 43fc2c4..0d48335 100755
--- a/salma-hayek/bin/invoke-java.rb
+++ b/salma-hayek/bin/invoke-java.rb
@@ -389,6 +389,8 @@ class Java
add_property("e.util.Log.applicationName", @app_name)
+ args << "-Xmx1g"
+
if target_os() == "Darwin"
args << "-Xdock:name=#{@app_name}"
args << "-Xdock:icon=#{@mac_dock_icon}"
... then the test case completes five times faster and without grinding the entire 8 core, 32 GiB RAM machine into the ground. I notice the automatic flusher kicking off, which didn't happen before:
martind@swiftboat:~$ DEBUGGING_TERMINATOR=y time terminator -e bash -c 'yes | head --lines 41001001'
2019-03-07T14:38:19.123-0800 Terminator: Java 1.8.0_171 (VM 25.171-b11, runtime 1.8.0_171-8u171-b11-1~bpo8+1-b11)
...
2019-03-07T14:38:41.681-0800 Terminator: Available memory down to 216639112, flushing biggest scroll buffer...
...
2019-03-07T14:38:59.525-0800 Terminator: Available memory down to 215221952, flushing biggest scroll buffer...
...
2019-03-07T14:39:23.42-0800 Terminator: Available memory down to 213226776, flushing biggest scroll buffer...
...
2019-03-07T14:39:47.217-0800 Terminator: Available memory down to 213220744, flushing biggest scroll buffer...
...
2019-03-07T14:40:04.390-0800 Terminator: Available memory down to 211498800, flushing biggest scroll buffer...
...
2019-03-07T14:40:25.877-0800 Terminator: Available memory down to 196582736, flushing biggest scroll buffer...
...
736.83user 24.92system 2:12.81elapsed 573%CPU (0avgtext+0avgdata 1247668maxresident)k
504inputs+240576outputs (13major+414108minor)pagefaults 0swaps
martind@swiftboat:~$
Generating continuous output seems like a perfectly reasonable use-case to me, one which I had thought we'd made work with the previous round of "flushing biggest scroll buffer" changes in the Yogesh Gangurde era. I pushed it, with a small code-comment.