Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Compare branches and performance
Tim__D
I'm using Teamsite and the compare any functionality to merge concurrent lines of development. This process is painfully long. Why does Teamsite take 20min to produce a list with only 1 file in conflict or a few modified files. When I compare editions within the same branch the results are much faster.
- Tim
Find more posts tagged with
Comments
Migrateduser
Tim,
Okay, I'll try to explain some of the compare internals that might account for the performance difference.
In the most general case, when you compare two areas in TeamSite, the server must perform a recursive traversal of the directory trees in both areas and compare the version of each file in one area with the corresponding version in the other area. Since this can be seriously slow, the server uses a number of tricks to boost performance where possible. However, these tricks tend to help the single branch case much more than the cross-branch case.
For example, if the server knows that no files in a subdirectory of one area are different from those in the corresponding subdirectory in the other area, then it can skip traversing the two directories altogether. Because of the way editions share subdirectories with other editions on the same branch, the server can tell that a subdirectory in one edition is exactly the same as the corresponding subdirectory in another edition on that branch, and it skips traversing both subdirectories during a compare. A large portion of the subdirectories in editions on the same branch tend to be shared, so this optimization is particularly effective. Because editions from different branches don't share subdirectories in the same way, this optimization does not improve performance for compares across branches.
Also, when the server compares the version of a file in an area with the version of the file in the other area, it must determine which version is based on the other (which version is "newer" than the other) or whether the two versions are based on a common ancestor version (a "conflict"). To do this, it must walk the chain of predecessor versions from one of the versions until it finds the other version, or walk the chain of predecessors of both versions until it comes to a common ancestor version. In general, this can be expensive, depending on the number of predecessors a file has. However, if you're comparing versions from two editions on the same branch, then the server can simply examine the revision numbers of the two versions and tell that the newer version is the one with the greater revision number. (Editions on the same branch cannot have conflicting versions.) This makes comparing versions on the same branch much faster.
If you're finding that you have to propagate files often from one branch to another, you might have try to figure out ways to limit the number of files compared. For example, you might want to look at the submit log from the source branch to first get a list of the files to compare with the destination branch.
Hope that helps.
Terrence
Interwoven Engineering
Tim__D
Terrence,
Thanks for your explanation. That helps to understand why the performance is slow. Maybe developing something custom that looks at the submit log of all the workareas of a branch when doing merges may limit the number of files to compare and then speed up performance rather than relying on the build in "compare any" functionality in Teamsite.
Thanks,
- Tim
Migrateduser
Yeah, some sort of script might be the way to go if you have to do a particular compare a lot. I don't want to discourage you from using "Compare Any", but you do have to weigh the convenience against the cost.
Terrence