Community
Participate
Working Groups
A user of the VCM API can easily call API methods, that cause a round trip, within a loop. This can potentialy result in multiple connections to the repository in a short period of time. For example: IFileEdition[] editions; for(int i = 0; i < editions.length; i++) { InputStream is = editions[i].fetchContent(null); } Our current API does not allow the client of the API to help the adapters batch round trips (e.g. of course if the adapter can implement batching within a connection). We will need a IVCMRunnable interface such that the following code could be written: VCMAdapter.run( new IVCMRunnable() { public void run(IProgressMonitor monitor) { IFileEdition[] editions; for(int i = 0; i < editions.length; i++) { InputStream is = editions[i].fetchContent(null); } } The adapter could have the opportunity to setup a connection to run batch VCM operations: public void run(IVCMRunnable job, IProgressMonitor monitor) throwsVCMException { monitor = Policy.monitorFor(monitor); try { monitor.beginTask(null, Policy.totalWork); try { openConnection(); job.run(Policy.subMonitorFor(monitor, Policy.opWork, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK)); } catch (OperationCanceledException e) { getWorkManager().operationCanceled(); throw e; } finally { closeConnection(); } } finally { monitor.done(); } } NOTES: Jean-Michel (8/24/01 1:54:48 PM) In our current implementation a "Compare with Version" on a project with a project in another repo will cause multiple round-trips to retrieve the file contents to be compared. This will crash inetd running CVS pservers. There might be other operations in the VCM UI which call VCM fetch operations recursively or in a loop.
PRODUCT VERSION: R0.9
fixed now that we no longer have VCM API to go through :)
Re-opening, we still have the multiple round trip happening in compare. For example, the compare client gets the remote tree then in a loop calls getContents() on each remote handle. This will cause multiple round trips to the server. It would be better to batch these in one command.
This would require some more major refactoring of the command infrastructure and I'm not comfortable doing this for M5. I would even say that this is a feature request.
*** Bug 13422 has been marked as a duplicate of this bug. ***
Lets look at this as part of round we are doing on # of connection creation.
Michael is working on this enhancement.
We now use a conection per tree when merging and comparing.