[scalability] SVN update takes hours if "Synchronize" view is opened
Bugzilla Link | 504058 |
Status | NEW |
Importance | P3 normal |
Reported | Oct 05, 2016 07:57 EDT |
Modified | Oct 31, 2016 15:23 EDT |
Version | 3.0.2 |
Depends on | 505611 |
See also | 504568, 505360 |
Reporter | Andrey Loskutov |
Description
We have observed that "Update To" invoked from the History view can take literally hours if we had a Synchronize view opened and populated before.
We had a few commits in the SVN with changes on more then 1000 files each. Actual SVN update to the commit containing 10000 changed files takes ~3 minutes on command line, but the task triggered from Eclipse spins three jobs "Update To Operation", "Update SVN Cache", "Updating Synchronize view for SVN Workspace" which together take more then a hour, keeping up to two CPU cores 100% busy.
Closing the "Synchronize" view before update fixes the "hours" update to few minutes, still longer as command line, but at least not a hour anymore.
The problem can be observed by using default Subversive settings. I've tried to play with different Subversive settings but so far found nothing really helpful.
What also interesting is that the progress view shows "Updating" for resources which should have never been managed by SVN (they are both derived AND excluded via Team ignore hints).
I've debugged this a lot last few days, without real understanding of all this "team synchronize" design, which seem to be a huge over-engineered framework written at time of CVS and probably designed around CVS deficiencies. I cannot imagine this can be made reasonably fast at any time. Additionally, it is almost impossible to debug because of multitudes of different jobs and listeners sending events to other listeners which spin their own jobs to send even more events again to some listeners...
The main issue here is that due the "event per change" design, and LOT of redundant events sent/proceed by the team framework for each single change, Eclipse simply overloaded with that event handling. Funny thing to observe that JVM uses 100% of the CPU doing literally nothing for a hour after all SVN operations were finished, while dispatching gazillions of events in org.eclipse.team.internal.core.BackgroundEventHandler.processEvents(IProgressMonitor). BTW this specific observation about BackgroundEventHandler is related to the "Updating Synchronize view for SVN Workspace" job.
Unfortunately I do not have a public SVN server for reproducing this, but I will try to find one.
The key points for reproducing the problem:
- huge project (we have ~15000 versioned files in ~300 folders, and ~10000 derived files in ~300 derived folders)
- big remote commit containing > 10000 changed files
- Opened "Synchronize" view
- SVN update to that huge commit
=> leads to ~2 hours overall update time in Eclipse, compared with 3 minutes on command line.
This happens with our (3.0.2) and latest available (4.x) Subversive versions, on both Eclipse 3.8.2 and 4.6.1, with SVN connector 5.0.1 and SVNKit 1.7. (SVN/1.7.11 SVNKit/1.7.14 (http://svnkit.com/) r10415_v20150322_2135).
I think I have some kind of fix for this (bigger change), but I have to cleanup the code and cherry pick it to 4.x subversive branch before I can post it.