Home > News content

Microsoft Open Source Scalar boosts the speed of operating giant Git warehouses

via:博客园     time:2020/2/18 9:49:48     readed:37

Git belongs to the distributed version control system. By default, each git warehouse has a complete file copy of the entire history. Even medium-sized development teams generate thousands of submissions, adding hundreds of megabytes of data to the warehouse each month. With the increase of warehouse space, Git is difficult to manage all the data, which makes its operation more and more difficult. In this way, the developer's time will be wasted on waiting for feedback after executing the command, such as usingGit statusGet the modified file, or use theGit fetchPull the code locally. Due to the long waiting time, developers tend to switch to other tasks, and switch back after the command is executed. And this way of switching tasks back and forth oftenReduce developer productivity.

Microsoft is obviously experienced in dealing with giant git warehouses. After all, the code of Windows operating system is managed by GIT. In order to overcome the above problems, Microsoft developed VFS for GIT(Formerly known as GVFS ), this project uses virtual file system to bypass many warehouse size restrictions, so Windows developers can also use git normally before such a large project.


While developing vit for git, MicrosoftUsing a custom tracking systemAnd collect user feedback to identify performance bottlenecks. During this period, Microsoft also contributed some code to git client, includingCommit graphFunctions andGit pushandSparse checkoutsImprovement. Based on these contributions and many other recent improvements to Git, Microsoft launched a project

Scalar is a. NET Core application written using C #, Only supported in windows and Mac OS platforms。 Scalar maximizes the performance of GIT commands by setting recommended configuration values and running background maintenance. No matter what services developers use to host the code warehouse, scalar can effectively speed up git instructions. Microsoft mentioned that as long as you use scalar to register for the largest code warehouse, you can immediately feel the great improvement in Git execution speed.


For scalar's future, Microsoft hopes to contribute it to GIT. Microsoft plans to integrate git acceleration method in scalar into git project directly. The final implementation allows developers to get these performance improvements without scalar and only using git client. But there is still a long way to go to achieve this goal. Microsoft mentioned that at present, sparse detection is a method used by scalar to solve the problem of warehouse scale expansion. Although git has recently updated the sparse detection function to make it easier to use, there is still a long way to go before it reaches the stage of providing complete functions.

Scalar currently uses sparse checkout rather than virtual file systems, so there are bottlenecks when executing git commands, especiallyGit checkoutIt's not as fast as VFS for GIT. Microsoft is working on parallel versions ofGit checkoutTo improve execution performance. Microsoft mentioned that in order to truly extend git services to meet the needs of thousands of engineers and build machines to interact with the central server, GIT needs to provide a concept similar to GVFS cache server. They also said they plan to put the idea on the mailing list soon.

In addition, at present, the reason why git client warehouse can execute smoothly is that it relies on the regular execution of the foreground garbage collector, but Microsoft mentioned that for the giant warehouse, this is not a feasible method. Therefore, Microsoft plans to add some form of background maintenance function in Git client, similar togit maintenance startCommand, andscalar registerJust as easy to use.

Please check the detailed instructionshttps://devblogs.microsoft.com/devops/introducing-scalar

China IT News APP

Download China IT News APP

Please rate this news

The average score will be displayed after you score.

Post comment

Do not see clearly? Click for a new code.

User comments