Bug 314632 - [terminal][local][performance] Workbench shutdown is slow when multiple local terminals are open
Summary: [terminal][local][performance] Workbench shutdown is slow when multiple local...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P2 normal (vote)
Target Milestone: 4.0   Edit
Assignee: dsdp.tm.core-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-05-27 06:06 EDT by Martin Oberhuber CLA
Modified: 2015-05-06 14:48 EDT (History)
4 users (show)

See Also:


Attachments
Bash script to determine approximate workbench shutdown time (576 bytes, text/plain)
2010-06-02 04:10 EDT, Mirko Raner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2010-05-27 06:06:54 EDT
+++ This bug was initially created as a clone of Bug #313643 +++

Build ID: HEAD of 27-May-2010 on Platform 3.6rc2 on Linux-GTK RHEL4

Even though Workbench no longer asks about open terminal sessions on shutdown, I noticed that shutdown is very slow when multiple local terminal sessions are open.

On my machine, I consistently measured 6 sec shutdown time with 3 local terminals open, but 1 sec shutdown time when no local terminal was open. I find this pretty drastic and worth examining, since this is one of the cases where our new feature potentially hurts others.
Comment 1 Mirko Raner CLA 2010-05-28 19:06:40 EDT
I can look into this for RC4 (it's a holiday weekend, and I'll be out of town until Tuesday to "recharge my batteries").

Thanks for all the thorough testing so far, Martin!
Comment 2 Mirko Raner CLA 2010-06-02 04:10:46 EDT
Created attachment 170750 [details]
Bash script to determine approximate workbench shutdown time

I tried this on my local machine (Mac OS 10.5.8), and do I notice a slight degradation in workbench shutdown time.

I used the attached bash script to get a better reading of how long the shutdown takes. The script does not take certain delays into account and does not exactly reproduce a manual shutdown, so the times measured by the script are somewhat approximate but in line with manual observations on my system.
To use the script, start Eclipse with the -console <port number> option (e.g., eclipse -console 8123) then invoke the script with the same port number (e.g., time-eclipse-shutdown 8123). The script will terminate Eclipse by issuing a shutdown command to its OSGi console and times how long it takes for the process to be terminated.

The script was written for Mac OS; some modifications might be necessary on other platforms.

These are the results (in seconds):

         no bash  3x bash  6x bash  10x bash
         running  running  running  running
-------  -------  -------  -------  -------
1st run    1.04     1.09     1.05     1.01
2nd run    0.92     1.03     1.00     1.06
3rd run    0.94     1.04     1.04     1.12
4th run    0.95     1.06     1.12     1.07
5th run    0.89     1.00     1.02     1.07
6th run    1.07     1.08     1.10     1.06
-------  -------  -------  -------  -------
minimum    0.89     1.00     1.00     1.01
maximum    1.07     1.09     1.12     1.12
-------  -------  -------  -------  -------
average    0.968    1.050    1.055    1.065

The results indicate that there is about a 10 to 30 millisecond penalty for every additional console process during shutdown (on Mac OS).

Martin, can you try obtaining a couple of full thread dumps during shutdown on your system when a couple of terminal sessions are open? The times are too short on my system to obtain meaningful results.
Also, please let me know if you have any suspicions what might be causing the delays on your system. That might give me a starting point to start looking.
Comment 3 Uwe Stieber CLA 2015-05-06 04:51:31 EDT
No longer maintained and removed from TM Terminal repository.
Comment 4 Martin Oberhuber CLA 2015-05-06 14:48:56 EDT
I would actually say that the issue is FIXED with the new tm.terminal 4.0 implementation of local terminals.