Skip to content

cargo clippy is sometimes >20x slower than cargo check (since 1.58.0) #8171

@wtfsck

Description

@wtfsck

Summary

cargo +beta check takes ~1min to run but cargo +beta clippy takes ~23mins to run.

There's a Rust 1.57.0 issue (maybe this one) that makes compiling some code really slow. However there's no problem with clippy 0.1.57, only with 0.1.58 so I think this is a clippy issue.

cargo check

This is normal.

time command
0m56,532s time cargo +stable check --release --no-default-features --features "std decoder code_asm" --tests
0m52,658s time cargo +beta check --release --no-default-features --features "std decoder code_asm" --tests

cargo clippy

1.57.0: normal, 1.58.0 (beta): way too slow.

time command
1m40,849s time cargo +stable clippy --release --no-default-features --features "std decoder code_asm" --tests
23m26,212s time cargo +beta clippy --release --no-default-features --features "std decoder code_asm" --tests
  • stable: rustc 1.57.0 (f1edd0429 2021-11-29) and clippy 0.1.57 (f1edd04 2021-11-29)
  • beta: rustc 1.58.0-beta.2 (0e07bcb68 2021-12-04) and clippy 0.1.58 (0e07bcb 2021-12-04)

Reproducer

git clone https://github.com/icedland/iced.git
cd iced/src/rust/iced-x86
# execute one of the commands above (see the tables)

Version

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-unknown-linux-gnu
release: 1.57.0
LLVM version: 13.0.0

rustc 1.58.0-beta.2 (0e07bcb68 2021-12-04)
binary: rustc
commit-hash: 0e07bcb68b82b54c0c4ec6fe076e9d75b02109cf
commit-date: 2021-12-04
host: x86_64-unknown-linux-gnu
release: 1.58.0-beta.2
LLVM version: 13.0.0

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions