r/linux • • Nov 17 '17

Microsoft and GitHub team up to take Git virtual file system to macOS, Linux - With GVFS, a local replica of a Git repository is virtualized such that it contains metadata and only the source code files that have been explicitly retrieved - Microsoft modified Git to handle this virtual file system

[deleted] — view deleted post

426 Upvotes

262 comments sorted by

View all comments

Show parent comment

6

u/NAN001 Nov 17 '17

Isn't downloading the whole repo a one-time cost? After that it justs retireves files modified right?

18

u/reddraggone9 Nov 17 '17

the Windows codebase has over 3.5 million files and is over 270 GB in size. The Git client was never designed to work with repos with that many files or that much content. You can see that in action when you run “git checkout” and it takes up to 3 hours, or even a simple “git status” takes almost 10 minutes to run. That’s assuming you can get past the “git clone”, which takes 12+ hours.

https://blogs.msdn.microsoft.com/devops/2017/02/03/announcing-gvfs-git-virtual-file-system/

2

u/NAN001 Nov 17 '17

Wow, doesn't scale indeed. How do they manage to keep the Linux kernel's source under such size?

18

u/frymaster Nov 17 '17

The Linux kernel is just the kernel, while the Windows codebase is the entirety of Windows

2

u/[deleted] Nov 19 '17

Including all the extra crap like the apps included with windows.

8

u/Mr_s3rius Nov 18 '17

The linux kernel is only 62000 files at 770MiB. That's one 300th of that Windows repo.

6

u/jmtd Nov 17 '17

Anyone working on that code base won't be touching 99.99% of it anyway. So it doesn't need to be in one repo.

5

u/[deleted] Nov 17 '17

Splitting repos across logical boundaries is tough for monolith code bases. We tried it for a large legacy php repo. Such a PitA.

4

u/nonchalantlarch Nov 18 '17

It's too bad nobody at Microsoft thought of that, they could have avoided investing all that time and money into this project...

3

u/[deleted] Nov 17 '17

It's a one time cost, sure, but I recall reading about MS's use case a while ago and they have repos hundreds of gigabytes large with hundreds of branches. Git was almost unusable if I recall correctly. A simple git status would take hours.

1

u/UTF-9 Nov 17 '17

Yeah and if you want to recursively grep the source this new FS is worthless because you need all the files anyway.

10

u/exscape Nov 17 '17

That's not the use-case, though. They developed this for the Windows source tree. According to them, it takes 3 hours to run a "git checkout" with plain Git, on the 270 GB repo. That's clearly not acceptable, so a better solution is needed.

1

u/UTF-9 Nov 17 '17

on the 270 GB repo. That's clearly not acceptable, so a better solution is needed.

I agree, 270GB of source code is a disaster waiting to happen. They should probably break it up into submodules. You know git really isn't meant for binary data, I wonder how much of that is actually source code...

4

u/exscape Nov 17 '17

They claim 3.5 million "source files". That'd be an average of 81 kB per file, which does sound high, but not really insane.

4

u/DrPizza Nov 19 '17

81kB per file including all its history.

6

u/UTF-9 Nov 17 '17

not really insane.

so 3.5 million 3-6 Kloc source files? That's absolute madness. It's probably mostly proprietary blobs and data files which can be thrown in their own submodule, away from the actual source code. Or if it actually is source code, they should just do some house cleaning and put the billions of legacy lines into submodules.

3

u/keef_hernandez Nov 18 '17

Linux Kernel, not operating system.

I love when people make statements like this confidently stating how easy a situation they know very little about would be to fix.

-1

u/UTF-9 Nov 18 '17

I love when people make statements like this confidently stating how easy a situation they know very little about would be to fix.

Who are you quoting here? Are you defending a 270GB code repo? I can't tell. If you have that much code that legitimately needs to be all in one root repo you have failed horribly.