Why perforce is more scalable than git




















This is strongly related to Reason 1, since Git is well-known to be stronger than Perforce with branches and specially with merges.

Reason 3. You need to modernize your toolset because of different reasons. Reason 4. You need to implement DevOps, shorten release cycles and focus on task cycle time.

Reason 5. Cloud hosting. Perforce is a super strong system. Thus, many features are a must for teams using it. Strength 1. Not everything is code.

There are assets, documents, images, videos, models and many more where collaboration requires just one contributor making changes at a time. Strength 2. Simplicity for non-coders. Git might be the pervasive version control on Earth, but for many it is a problem to use. That is especially true for non-coders. Artists in game development, engineers dealing with models and many more, simply prefer to skip the "extra push" imposed by the Git model. Sometimes you simply want to work centralized.

Strength 3. Huge depots and big files. When your depots are several gigabytes, even terabytes, then Perforce shines where others crumble.

Git has well-known struggles when repos go beyond a certain size. Strength 4. Work centralized. This is related to Strength 1 but deserves a point on its own. Or maybe because of some privacy or auditing policy or some compliance rules that you must adhere to. Strength 5. With very big depots, speed matters.

High data transfer speeds are deeply related to the big depots and big files requirements. Did the previous weakness reasons and strengths ring a bell? Did they describe what you are looking for? If not, maybe you can share your concerns with us. Email us at support codicesoftware. Otherwise, it seems we know what you are looking for. Now it is a matter of figuring out if we can really offer you an alternative to Perforce. There are many version control systems out there, but if you need a solution as of , the list comes down to just two options: you can switch to Git or you can migrate to Plastic.

Git certainly won the version control wars, if there ever was one. Git is the version control system that is the most widely adopted on the planet, mostly thanks to the incredibly successful GitHub collaboration platform. So, you should definitely go to Git unless you need any of the following missing features not found on it. Warning 1. GitHub and a few other providers implement some workarounds, but it is definitely not the locking you are used to in Perforce.

It is an external workaround to mark files in a way so that they are not overwritten when sent to the central server. Locks are there in P4 to prevent wasting contributors time by doing changes they will later discard.

Warning 2. You might certainly have heard of Microsoft implementing their own extensions to Git to support big repositories. Basically, they are trying to convert Git, a distributed system, into a centralized one. At the time of writing this, this solution is mostly used just by Microsoft internally. Instead of storing the object inside the repo like Perforce does they store a reference, and then the actual object is stored elsewhere typically in GitHub, the object is stored in some Amazon AWS blob.

The solution is not native, and this is the key reason why teams with large files move away from Git, even when they are small teams. Warning 3. Git forces you to work distributed. This might not be a big deal for your company in fact it is not for thousands of teams around the world. The two share a lot of similarities and there's a core that you could probably extract to use to build both, but when you're talking optimal systems, there are forces that are in conflict. The problem is that if you aren't hip-deep in both systems, you often can't see the tradeoffs, or if someone explains them to you, you might say "But just do this and this and this and you're done!

If you haven't had this experience, you probably won't understand this point until you have. There are always tradeoffs. Lately at my work, I've run into a series of issues as I get closer to optimal in some parts of the product I'm responsible for where I have to make a decision that will either please one third of my customer base, or two thirds of my customer base. Neither are wrong, doing both isn't feasible, and the losing customers call in and wonder why they can't have it their way, and there isn't an answer I can give that satisfies them I don't want to give specific examples, but broad examples would include "case sensitivity" either way you lose in some cases or whether or not you give a particularly moderately important unavoidable error message; half your customers are annoyed it shows up and the other half would call in to complain that it doesn't.

You can't have it all. To my understanding: When git looks for changes it scans all the tracked files checking timestamps before hashing and hashing those that look changed.

Commits generate patches for all changed files, then generate hashes for each file, then hash the set of files in each directory for a hash of the directory, repeated until the state of the entire repository is collected into one hash. This is normally pretty fast, and has a lot of advantages as a way to represent state changes in the project, but it also means that if the project has several huge binary files sitting about or thousands of large binaries, etc.

This requires a full pass through the file any time that they look like they might have changed, new files are added, etc. Mercurial works very similarly, though the internal data structures are different. Running sha1 on a M file just took about 9 seconds on my computer; this goes up linearly with file size.

Git deals with the state of the tree as a whole , while Perforce, Subversion, and some others work at a file-by-file level , so they only need to scan the huge files when adding them, doing comparisons for updates, etc. Updating or scanning for changes on perforce or subversion does scan the whole tree, though, which can be very slow.

You can make git ignore the binary files via. You need to use something else to keep them in sync, though. Rysnc works well for me. Unison is supposed to be good for this, as well. You can still track the file metadata, such as a checksum and a path to fetch it from automatically, in a text file in git.

It won't be able to do merges on the binaries, but how often do you merge binaries? Well, rsync has a mode where you say "look, if the file size and timestamp are the same, please just assume it hasn't changed - I'm happy with this and am willing to accept that if that isn't sufficient any resulting problems are mine".

While I haven't checked the source, I'm pretty sure by default git doesn't re-hash any files unless the timestamps have changed. I know Mercurial doesn't. The scaling situation for the top post would involve large binaries builds or generated data being added on a regular basis.

A filesystem is a kind of database, too, of course. As I've said elsewhere in this thread, tracking metadata path and sha1 hash for large binary files in git and otherwise ignoring them via.

I'm pretty sure the "right tool" is either rysnc or something similar. You know, that got me thinking. ZFS will do versioning and, as a filesystem, you'd be keeping your binary data in it anyway. In ZFS, this versioning is implemented as a tree of data blocks, only those blocks that change between versions would be "new".

If a block is unchanged, ZFS can exploit shared structure to avoid needless copying. You can do a lot of things version control and encryption come to mind at the filesystem level. A filesystem is a specialized kind of database, anyway, and databases are surprisingly versatile. If memory serves, you can automatically mount daily snapshots of FreeBSD's standard filesystem. I'm using OpenBSD, which is slightly different. That's probably the sort of thing you need for this kind of work.

It was developed by DEC and then Intel for chip development, and those guys check in binary blobs. Vesta is a cool piece of technology in many ways. It has a pure functional build language, completely parallelisable builds with accurate caching between builds, etc. The guy who maintains it at Intel is a bit bitter because he can't understand why less capable version control or build systems are more popular.

Which is really because vesta's advantages show up best in quite large projects, but once your project is that large, it's very hard to switch. The web page looks moribund, but in fact it's still actively developed, and the developers hang out on IRC.

On several occasions, Perforce has introduced merge errors when merging from one branch to another. We use Perforce, but several major developers don't fully trust it, and we're investigating other options. It does seem to handle large binary files reasonably well, at least, though fully scanning for any changes the equivalent of "git status" generally takes about two minutes on my computer, so it's a mixed blessing.

I think tracking binary data would be better handled by a fundamentally different kind of tool, really; there are major differences between managing large binaries vs.

It introduces some really subtle bugs. It also happened again during the next major merge from ongoing-development to release. TwoBit on March 15, root parent next [—]. You are telling Perforce to force-merge files without you having a say in it,and you are complaining that some of them didn't go right? Sorry, but you won't get better results from anything else if you have that policy.

We have a very similar problem [except we have videos that need to sit right next to the code tree] and we have added those video subfolders into. I don't believe in 6GB source trees without binary blobs. Git does not like the use cases the author writes about. Git does not like gigantic sprawling repositories Linus mentioned in his Google talk that this was a problem with importing the KDE tree.

Git does not like large binaries there is some chatter on the mailing list about somewhat improving the situation , which makes it tricky to use for, e. Yes, Git is not perfect for every group and every use case. News at Beyond that, the author's snarky comments fall flat until they simply begin to contradict themselves: "The distributed stuff isn't really asked for, or needed Just give me a version control system that [lets me] merge changes into my coworker's repos, without having to check them in first.

The "Perforce at Google" case study that this article links to seems to discount some of the ideas that Perforce is super-scalable.

Things like: - "Every command, from any client e. I would argue that having every project ever in the same repo isn't a good thing to have even if Perforce can handle it. Sounds like they're both optimized for very different use cases and very different definitions of scalability.

SVN is much simpler than git for the simple stuff checking in files and updating them when everyone's online , and much more complex than git for the complicated stuff branching and merging.

Or put another way, git's learning curve is steep up front, and then increases moderately as you do weird things; SVN's learning curve is very shallow up front and then increases rapidly. If you're storing large files, if you're not branching, if you're not storing source code, and if your team is happy with SVN and the workflow you have, I'd say you should stay on SVN.

If you're writing source code with a relatively modern development practice developers doing local builds and tests, pre-commit code reviews, preferably automated testing, preferably some amount of open-source code , you should move to git for two reasons: first, this style of working inherently requires frequent branching and merging, and second, your ability to interact with outside projects is easier if you're all comfortable with git instead of snapshotting the outside project into SVN.

Get Advice. Follow I use this. Git vs Perforce: What are the differences? Decisions about Git and Perforce. Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare. Pros of Git. Pros of Perforce. Pros of Git 1.



0コメント

  • 1000 / 1000