-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: Speed up third party libraries cloning #28567
base: dev
Are you sure you want to change the base?
Build: Speed up third party libraries cloning #28567
Conversation
If this is to be added it should be non-default and somehow configurable, because I really enjoy full repository histories in the dependencies. |
Maybe squash 1st, 2nd and 4th commits into one? |
a37edfe
to
914dc0e
Compare
Co-authored-by: ilya-fedin <[email protected]>
eddca0c
to
2154526
Compare
if no_deps_git_history: | ||
print("Notice: Some dependency repositories will be downloaded without full history (via git clone --depth 1) to reduce time and disk space.") | ||
|
||
def git(command, args): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does what I asked, but not the way other things are done here. It looks to me that more consistent with how the script already works would be another approach:
- if 'no-deps-git-history' is passed as an option you add something like 'DEPTH' -> '--depth 1' to the 'environment' map, otherwise set it to an empty string
- in all places necessary just add $DEPTH in the git command so that the '--depth 1' is added if necessary..
If this way it works as expected, then I'd like that approach to be implemented. If somehow I missed something and this doesn't work then we'll proceed with the one you proposed.
When I tried to build Telegram Desktop from source code, I realized it was running pretty darn slow.
When I decided to look into it, I suddenly found out that the preparation script clones the entire git repository index of each third party library used, not just the last commit we need to build. So I looked at which stages
tdesktop
uses just a branch (without explicitly checkingout to a specific commit) and added the--depth 1
parameter. This greatly reduces build preparation time, as well as disk space and traffic used, since some of the libraries used are very large.