views:

673

answers:

6

Our project is held in a SourceSafe database. We have an automated build, which runs every evening on a dedicated build machine. As part of our build process, we get the source and associated data for the installation from SourceSafe. This can take quite some time and makes up the bulk of the build process (which is otherwise dominated by the creation of installation files).

Currently, we use the command line tool, ss.exe, to interact with SourceSafe. The commands we use are for a recursive get of the project source and data, checkout of version files, check-in of updated version files, and labeling. However, I know that SourceSafe also supports an object model.

  • Does anyone have any experience with this object model?
  • Does it provide any advantages over using the command line tool that might be useful in our process?
  • Are there any disadvantages?
  • Would we gain any performance increase from using the object model over the command line?
+1  A: 

We've since upgraded our source control to Team Foundation Server. When we were using VSS, I noticed the same thing in the CruiseControl.Net build logs (caveat: I never researched what CC uses; I'm assuming the command line).

Based on my experience, I would say the problem is VSS. Our TFS is located over 1000 miles away and gets are faster than when the servers were separated by about 6 feet of ethernet cables.

Edit: To put on my business hat, if you add up the time spent waiting for builds + the time spent trying to speed them up may be enough to warrant upgrading or the VSS add-on mentioned in another post (already +1'd it). I wouldn't spend much of your time building a solution on VSS.

Austin Salonen
Oh to be able to change our source control system. Such luxuries are not to hand, unfortunately.
Jeff Yates
+1  A: 

VSS uses a mounted file system to share the database. When you get a file from SourceSafe it works at the file system level which means that instead of just sending you the file it send you all the blocks of the disk to find the file and the file. This adds up to a lot more transactions and extra data.

When using VSS over a remote or slow connection or with huge projects it can be pretty much unusable.

There is a product which amongst other things improves the speed of VSS by ~12 times when used over a network. It does this by implementing a client server protocol. This additionally can be encripted which is useful when using VSS over the internet.

I don't work or have any connection with them I just used it in a previous company.

see SourceOffSite at www.sourcegear.com.

Tony Lambert
I understand the alternative tools exist. This isn't my question. I want to know if the object model is better than the command-line tool. We don't have the option of buying new software.
Jeff Yates
I don't why you marked me down for suggesting an answer to the only actual issue in your question. Do you want an answer or just the points?
Tony Lambert
I understand that there are alternative tools but we have been told we can't move to them. My question is quite clear and your answer doesn't address it.
Jeff Yates
it isn't an alternative tool you use it alongside.
Tony Lambert
Apologies, I should've said "additional".
Jeff Yates
+2  A: 

I should imagine the command line is implemented internally with the same code as you'd find in the object model, so unless there's a large amount of startup required, it shouldn't make much of a difference.

The cost of rewriting to use the object model is probably more than would be saved in just leaving it go as it is. Unless you have a definite problem with the time taken, I doubt this will be much of a solution for you.

You could investigate shadow directories so the latest version is always available, so you don't have to perform a 'getlatest' every time, and you could ensure that you're talking to a local VSS (as all commands are performed directly on the filesystem, so WAN operations are tremendously expensive).

Otherwise, you're stuck unless you'd like to go with a different SCM (and I recommend SVN - there's an excellent converter available on codeplex for it, with example code showing how to use the VSS ans SVN object models)

gbjbaanb
This is what I imagined would be the case myself. As for alternatives, I am aware they exist but there is no money to buy new software, and in the case of free alternatives, there is currently no convincing the powers that be that it is a wise move when what we have works (slowly).
Jeff Yates
wait until you check in a very large file, or check in from a client across the WAN. Once you've recovered your corrupt VSS DB a couple of time, the powers that be are quite receptive to migrating even to a free SCM. But if it ain't broke, don't try to fix it.
gbjbaanb
+1  A: 

In answer to the only part of your question which seems to have any substance - no switching to the object model will not be any quicker as the "slowness" is coming from the protocol used for sharing the files between VSS and the database - see my other answer.

The product I mentioned works along side VSS to address the problem you have. You still use VSS and ahev to have licences to use it... it just speeds it up where you need it.

Not sure why you marked me down?!

Tony Lambert
There is no subjective trolling. I asked if there is any benefit in using the VSS object model over it's command line tool. Relax.
Jeff Yates
A: 

I betting running the Object Model will be slower by at least 2 hours.... ;-)

Tony Lambert
Yeah, the two hours it takes to transfer our build over to it? :D
Jeff Yates
A: 

How is the command line tool used? You're not by chance calling the tool once per file?

It doesn't sound like it ('recursive get' pretty much implies you're not), but I thought I'd throw this thought in. Others may have similar problems to yours, and this seems frighteningly common with source control systems.

ClearCase at one client performed like a complete dog because the client's backend scripts did this. Each command line call created a connection, authenticated the user, got a file, and closed the connection. Tens of thousands of times. Oh, the dangers of a command line interface and a little bit of Perl.

With the API, you're very likely to properly hold the session open between actions.

darron