[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ./update.sh command stuck on "Updating crates.io index" but doesn't consume internet bandwidth



> Hi!
>
> I am trying to package tokenizers crate.
>
> After cloning debcargo-conf repo, running "./update.sh tokenizers"
> (done within a few seconds), updating package related files, running
> "./update.sh tokenizers" again, the command stuck on "Updating crates.io index"
> (for 15 minutes). It doesn't consume any internet bandwidth but
> consumes a whole single processor core.
>
> Is this expected? If yes, how long does this usually take and are

This is to be expected because Cargo is still using libgit2 (a
not-very-performant Git implementation) to fetch index repositories.
Depending on your system's single-core performance, this can take up
to an hour on low-power systems.

> there ways to speed up this step?
>

Usually, I manually update the index repositories. You can try the
following commands:

cd ~/.cargo/registry/index/github.com-1ecc6299db9ec823
git remote add origin https://github.com/rust-lang/crates.io-index
git fetch --all
git gc --aggressive # (optional, repacks Git repository, significantly
optimizes disk usage, but can take half an hour with all CPU cores at
100%)

> My device specs:
> Device: Lenove Ideapad 5 laptop
> OS: Debian GNU/Linux 12 (bookworm) x86_64
> CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz
> RAM Memory: 8GB
> Storage type: NVME SSD
>
> I run the command inside debian sid chroot.
>
> Best regards,
> Ahmed Siam
>

Thanks,
Zixing


Reply to: