Skip to content
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

Installing git feature is slow #337

Open
mataslib opened this issue Dec 15, 2022 · 8 comments
Open

Installing git feature is slow #337

mataslib opened this issue Dec 15, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@mataslib
Copy link

mataslib commented Dec 15, 2022

Is it normal that git feature takes about ~10 minutes to install? It's even building some kind of translations...

image


Win11
Wsl2
Docker for desktop
Dell XPS 9570, Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2208 Mhz, 6 Core(s), 12 Logical Processor(s), 64 GB ram, 1 TB SSD Samsung 980

@samruddhikhandale
Copy link
Member

Are you using the default options for the git Feature? If not, then can you paste the values in here?

With default options, it takes 12.7 sec - action run

With ppa:false, git is built from source and it takes ~4.5 mins - action run

@mataslib
Copy link
Author

mataslib commented Dec 16, 2022

Screenshot was taken having this configuration:

"ghcr.io/devcontainers/features/git": {
      "version": "latest",
      "ppa": false
}

However, I had also tried with ppa: true, I stopped the installation when there was ~800 seconds and counting - that takes even more time on my machine than ppa: false.

@mataslib
Copy link
Author

mataslib commented Dec 16, 2022

With ppa:true It hangs on => => # (*) Downloading GPG key...

image

@mataslib
Copy link
Author

mataslib commented Dec 16, 2022

Alright "version": "latest" is culprit. With it deleted and ppa: false it is done in 0.5 seconds. Thank you for help! I don't know what is wrong with "version": "latest" however It seems to me that it can happen to lot of devs and should be somehow prevented.

Maybe latest is not valid value for git feature? I have probably coppied config from another feature like docker-in-docker and just wanted latest git therefore it seemed okay to me.

@Chuxel
Copy link
Member

Chuxel commented Dec 16, 2022

@mataslib Linux distributions ship git inside them, but only one version. The PPA option on Ubuntu allows the use of pre-built versions of git other than the one in the distro. In other cases, it has to be compiled to be installed, which takes a while. This is generally a problem with things that are a core part of Linux distros (e.g. Python has similar challenges).

Using os-provided (which is the default if you omit version) will use whatever is in the distro.

You can pre-build your image if you really want the latest version of git to avoid this problem. https://containers.dev/implementors/reference/#prebuilding

@samruddhikhandale Should we keep this open to track potentially pre-building git ahead of time?

@samruddhikhandale
Copy link
Member

With ppa:true It hangs on => => # (*) Downloading GPG key...

image

ℹ️ This is a separate issue tracked in #323

@samruddhikhandale
Copy link
Member

@samruddhikhandale Should we keep this open to track potentially pre-building git ahead of time?

Yep, sounds good 👍

@samruddhikhandale samruddhikhandale added the enhancement New feature or request label Dec 16, 2022
@mataslib
Copy link
Author

@Chuxel Thank you kindly for clarification. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants