Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 65818

Summary: [Connection] 20 second delay between modal dialogs on Update
Product: [Eclipse Project] Platform Reporter: Jared Burns <jared_burns>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 Keywords: helpwanted
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard: stalebug

Description Jared Burns CLA 2004-06-04 16:57:39 EDT
Build 20040604
Linux-GTK

Every time I use the Update action, there's a 20 second pause between the "Select Tag" dialog 
and the dialog that prompts for the CVS password. This is a problem because for an operation like 
this that is potentially very, very long, the user really wants to start the operation and walk away. 
Having to sit and wait for a prompt is frustrating.

I'm guessing that this delay is happening because we connect to the server first and only prompt 
when the discussion with the server gets to the point where it requests authentication? If so, 
couldn't we just observe that we're going to need a password (since it's an extssh connection) and 
prompt for it before communicating with the server?

If a synch is being done with multiple extssh connections, it should likewise prompt for a password 
for each server before communicating with any of them.
Comment 1 Jean-Michel Lemieux CLA 2004-06-10 22:08:39 EDT
Good idea, post 3.0.
Comment 2 Jared Burns CLA 2004-11-04 16:29:12 EST
I'd like to take a look at fixing this problem. Jean-Michel, could you possibly point me to where I 
should be looking to get started?
Comment 3 Michael Valenta CLA 2004-11-04 16:41:30 EST
The connection logic is in the CVSRepositoryLocation class. Have a look at 
openConnection(). I don't think the solution is a simple as what you described 
though. There are many cases where a password is not required (e.g. anonymous 
connection or when public keys are in use). In these cases, the connection 
should be attempted without prompting. Given the separation between the 
promting (in CVSRepositoryLocation) and the use of the password (in the 
connection method), it will be tricky to determine when to prompt without 
first attempting to connect.
Comment 4 Jared Burns CLA 2004-11-05 17:33:40 EST
By hacking around, I've managed to make a bit of an improvement. Performing an operation on 
multiple repositories, we currently do:
for each server {
  connect to the server (20 second pause)
  prompt for password
  perform operation (10 minute wait)
}

By adding a second (advance) loop to RepositoryProviderOperation and adding an openSession(...) 
method which creates the session (if any) for each operation, this becomes:
for each server {
  connect to the server (20 second pause)
  prompt for password
}
for each server {
  perform operation (10 minute wait)
}

Additionally, I've played around with hacking JschSession to prompt for a password before the 
connection is established. This puts the 20 second pause after the prompt, which is an improvement 
for the single-repository case:
for each server {
  prompt for password
  connect to the server (20 second pause)
}
for each server {
  perform operation (10 minute wait)
}

Of course, what we'd really like to do is to be able to prompt as necessary for each repository before 
any connections are made. I haven't given much thought to this yet, but since we know the 
connection type and the kind of operation that's going to be performed, it seems perfectly reasonable 
that we should be able to tell if a password is going to be needed.
Comment 5 Michael Valenta CLA 2004-11-08 09:55:50 EST
As I mentioned before, it is difficult to know if a password is required. How 
can you tell if a pserver conenction needs a password? You could guess that 
those with user names like anonymous or anoncvs don't but they still may. As 
for extssh, most times they need a password but connections that are 
configured to use a public key may or may not. And for ext, there is really no 
way to know since an external client is being used.

I don't like the idea of opening the connections all of front but it may be 
the only way. Perhaps the following scheme might work.

1) Add a boolean to the CVSRepositoryLocation to indicate that a successful 
connection has been made since Eclipse has been started (i.e. we are known to 
have a good password). The boolean starts at false and is set to true when an 
open succeeds.

2) When performing a CVS operation on multiple repositories, try to connect to 
each that has not been successfully connected to yet. However, do not leave 
this session open so that operation code is not modified. This would be just 
to ensure that a connection can be made before doing the bulk of the work.

3) The number of upfront connections could be reduced if we excluded those 
that had passwords cached in the keyring file.
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:13:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 7 Eclipse Genie CLA 2022-02-02 15:27:17 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.