Bug 12887 - [CVS Sync View] Sync View should display progress monitor while fetching remote contents for compare viewer
Summary: [CVS Sync View] Sync View should display progress monitor while fetching remo...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Michael Valenta CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
: 13159 (view as bug list)
Depends on: 13844
Blocks:
  Show dependency tree
 
Reported: 2002-04-05 12:40 EST by Jeff Brown CLA
Modified: 2003-09-16 13:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Brown CLA 2002-04-05 12:40:32 EST
Setting the input to the compare viewer in the Sync View may result
in a long-running remote operation while the contents of the remote
file are being fetched for the first time.  Without a progress monitor
it is not possible for the user to cancel the retrieval of a large
file.  If a connection error occurs, the user may need to wait up to
60 seconds until the timeout expires.

Moreover, this work is happening in the UI thread so the UI is
unresponsive and the application may appear to be "hung" for an extended
duration.
Comment 1 Jeff Brown CLA 2002-04-08 16:55:06 EDT
I was thinking of something along the lines of putting a progress monitor in 
the status bar with a STOP button.  I have seen some instances of this in 
Eclipse already.
Comment 2 Jeff Brown CLA 2002-04-17 15:48:43 EDT
Can't fix yet due to PR#13844.
Creating a modal context inside the methods that retrieve remote contents
causes a NullPointerException in Compare.
Comment 3 Kevin McGuire CLA 2002-06-11 17:17:37 EDT
later
Comment 4 Michael Valenta CLA 2002-09-09 15:47:26 EDT
Reopening
Comment 5 Kevin McGuire CLA 2003-03-21 13:49:15 EST
*** Bug 13159 has been marked as a duplicate of this bug. ***
Comment 6 Jean-Michel Lemieux CLA 2003-06-16 15:19:51 EDT
We should ensure that progres/cancellation is supported in the new sync view.
Comment 7 Michael Valenta CLA 2003-07-11 09:18:53 EDT
Progress appears for all operations in the Live Sync View. For refresh, either 
the workbench progress bar or the Job Progress mechanism is used. When opening 
a compare editor, a progress monitor is used.

However, the fetching of the remote contents still happens without a progress 
monitor. The culprit is RemoteResourceTypedElement#createStream() which 
creates a NullProgressMonitor.

The problem is that the compare interface IStreamContentAccessor does not 
provide a progress monitor on it's getContents(). Therefore, we either need to 
prefetch the contents before opening the editor or somehow get a monitor to 
the getContents. Anothe option may be to spawn a job but this would block the 
getContents() which is not ideal.

Given that we have remote file content cahcing, I think we shoudl pre-fetch 
the contents.
Comment 8 Michael Valenta CLA 2003-07-11 09:29:01 EDT
The problem is that we would also need to pre-fetch the base just in case. It 
would be interesting to spawn a background job to fetch the base so it would 
be there if the user wants it. Special consideration would need to be made for 
the case where the user requests the base before it has been fetched.
Comment 9 Michael Valenta CLA 2003-07-11 09:38:27 EDT
Forget the last comment I made. Compare needs both the base and remote 
immediately so we would need to prefetch both.
Comment 10 Michael Valenta CLA 2003-07-11 09:42:09 EDT
I have released the code to prefetch the contents. I'm not closing the bug yet 
becuase I'm not convinced this is the best fix.
Comment 11 Michael Valenta CLA 2003-07-11 10:41:19 EDT
This fix is adequate for M2 however it is CVS specific in the sense that it 
requires the IRemoteResource to cahce the contents and the CS implementation 
does. We will need to do similar caching in Team. An ideal soluton would be to 
post the caching from CVS in such a way that it could be used in both places 
and avoid duplicate caching of contents. Moving bug to 3.0 M3.
Comment 12 Michael Valenta CLA 2003-08-21 14:28:36 EDT
I'm deferring the cleanup to M4. 

What we need is a mechanism by which we can query a remote handle to see if it 
supports caching or not. If it does, then tell the hanlde to cache. If it 
doesn't, we need to provide the cahcing in Team to ensure responsiveness.
Comment 13 Michael Valenta CLA 2003-09-16 13:41:17 EDT
Added API to IRemoteResource to get an IStorage which provides access to cache 
contents for the remote handle. Fix has been released to HEAD.