Slow start time

Bug #119526 reported by Siegfried Gevatter
6
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Opinion
Low
Micah Cowan

Bug Description

Binary package hint: gnome-terminal

Each time I open a terminal window it appears instantly but it needs between 2 and like 7 seconds to display the «user@machine:~$» line, so although I can write on it I've to wait for that line until I can do anything. However, if I press «Ctrl + C» it appears without any delay. Once I've opened many terminals (more than 10) I don't experience this issue any more.

I'm using Ubuntu Feisty (without compiz nor anything like that).

Revision history for this message
Áron Sisak (asisak) wrote :

Thanks for taking the time to report this bug. Unfortunately we can't fix it, because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>. We'd be grateful if you would then provide a more complete description of the problem.

We have instructions on debugging some types of problems. <http://wiki.ubuntu.com/DebuggingProcedures> Thanks!

Changed in gnome-terminal:
assignee: nobody → asisak
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
Micah Cowan (micahcowan) wrote :

Áron, the reporter's description actually seems fairly complete to me. Please specify exactly what additional information he/she should be supplying. The specific things we need for bugs is (1) the actions taken, (2) the expected behavior (3) the actual behavior. For crashes, we usually need traces. 1 through 3 have been provided.

RainCT, I have been experiencing this problem for a long time myself (though it's much more like 2 seconds than 7, unless the box is fairly busy), but had not tried Ctrl-C as a solution. I assumed it was just bash taking a good time to load.

However, now that I've tried Ctrl-C, I discover that various things (such as my customized prompt) are not correct. This leads me to believe that the problem is that it takes a long time for bash to load its initialization files. I imagine that (for instance) bash-completion takes a while to load, among other things. Starting bash as "bash --norc" seems to confirm this problem: it comes up _instantly_.

Do you have customizations made to your .bashrc? Please move your custom .bashrc out of the way, and copy /etc/skel/.bashrc to your home directory, and see if this makes a difference. If there is a significant improvement, then the "bug" lies with your custom .bashrc, and this report should be closed. If not, then it should be considered a bug in the distributed rcfiles, and we'll handle it appropriately.

Moving bug from gnome-terminal to bash; reassigning to me, as I don't see a request for specific information from Áron, and I have just asked the reporter for information on results from various invocations.

Changed in gnome-terminal:
assignee: asisak → micahcowan
Revision history for this message
Micah Cowan (micahcowan) wrote :

Commenting out the three lines:

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

In my .bashrc (if you have them uncommented, and also making sure that they are commented in /etc/bash.bashrc) makes a very significant difference in load time for me. If this is the case for you, you might consider disabling the custom completions, or else using your own copy of the completions, with only the custom completions that you really care about.

Revision history for this message
Áron Sisak (asisak) wrote :

Thanks Micah for the quick reply and assigning this bug yourself.

Sorry, I think you are absolutely right, I only doubt that this slow startup is caused by a bug (especially in gnome-terminal).
I think this issue depends entirely on the system settings and performance of the computer or this might be a bash issue.

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Thanks for your feedback Micah, however, that lines you comment are already commented out.

Anyway, you're probably right that this isn't a bug, so I'm going to close it myself. Thanks again.

Changed in bash:
status: Incomplete → Invalid
Revision history for this message
Atanas Atanasov (thenasko) wrote :

I would like to reopen this bug with a suggestion for a possible solution. My idea is to run /etc/bash_completion in the background without delaying the display of a basic terminal. Bash has the functionality to perform basic completion (e.g. getting the name of an executable in a directory from $PATH) and this should be sufficient for the first 2 seconds of a user's session. I tried to move /etc/bash_completion to /etc/bash_completion_real and then created a dummy file /etc/bash_completion containing ". /etc/bash_completion_real &" but this does not seem to work. Somehow the completion executes in the background but does not affect the opened bash session. Could anyone suggest a fix?

Changed in bash (Ubuntu):
status: Invalid → New
Matthias Klose (doko)
Changed in bash (Ubuntu):
status: New → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.