| Summary: | [Connection] 20 second delay between modal dialogs on Update | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jared Burns <jared_burns> |
| Component: | CVS | Assignee: | 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
Good idea, post 3.0. 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? 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. 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.
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. 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. 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. |