Skip to content

Commit

Permalink
Fix wording (applying suggestions)
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxyas committed Aug 23, 2023
1 parent b404a25 commit bed387c
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions posts/inside-rust/2023-08-21-clippy-perf-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ description: This is the start of a series of posts talking about optimizations

Clippy's codebase is designed to be beginner-friendly so new contributors can come and learn,
not optimized for performance. It was never a priority to make Clippy fast because *it never needed
to be.* But time passed and more lints were added, now we have [over 650 lints][lint_list], each one of them adding a bit of performance overhead. In big projects this can take over a minute to check all those lints, so the Clippy team have decided to do something about it.
to be.* But time passed and more lints were added, now we have [over 650 lints][lint_list], each one of them adding a bit of performance overhead. In big projects this can take over a minute to check all those lints, so the Clippy team has decided to do something about it.

> <span class="note"><svg class="note-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg> Full disclosure</span>
>
> While some members are being sponsored by Embark Studios to continue / improve these efforts, these optimizations are and will be always free and open source. No brands attached.
> While Embark Studios is now sponsoring @blyxyas to continue / improve these efforts, these optimizations are and will be always free and open source. No brands attached.
The final goal of this project (and series of posts) is being able to run Clippy
quickly after save, making it a sort of IDE-companion, instead of a
totally external tool run in the CLI. Consuming less time / power on
CI checks would be a secondary goal, achieved collaterally
(but very much appreciated!).

Note that the project is divided in several *periods* of a duration of
1-2 months. Each period will have a dedicated blog post describing what are
its goals, and what goals were met in the last period.

## Careful analysis of the situation

Before opening your IDE, you must think "what is the biggest
Expand All @@ -39,22 +43,23 @@ From that thread, a lot of optimization opportunities came up. It revived [this

## Crafting a cartography of our problem

So, we decided to focus more on this section of the Clippy project. By the end of 2024 the following goals should have accomplished the following goals:
So, we decided to focus more on this section of the Clippy project. For the end of 2024 the goals of the project are the following:

- `is_from_proc_macro` use should be O(log n) time complexity instead of the current O(n).
- `rustc` and by proxy, Clippy, should not process allowed / disabled by default lints.
- Tools should be made to automatically benchmark every week or so the Clippy repo to check for regressions (we don't need per-commit benchmarking)
- Tools should be made to automatically benchmark the Clippy repo regularly to check for regressions (we don't need per-commit benchmarking)

These 3 are the main objectives of the performance project, there are secondary
goals and some of them may appear on the way, but these 3 should be
expected as a minimum.

These 3 objectives are the goal for this period, the next period
an update will be released with how much performance increased from the
last update and what are our next objectives.
In the next period update we'll be talking about the progress on these goals.

## A final note

The <span class="perf-project"><b>Performance project</b></span> is big, it
will (hopefully) be done by 2024 maybe it's delayed. I'll be writing
updates on this topic about every 1 or 2 months, so you (the
community) knows how it's going. Let's hope Clippy
will (hopefully) be done by 2024, but maybe it's delayed. Updates on this topic will be delivered about every 1 or 2 months, so you (the
community) know how it's going. Let's hope Clippy
is **blazingly fast** by 2024 🦀.

[lint_list]: https://rust-lang.github.io/rust-clippy/
Expand Down

0 comments on commit bed387c

Please sign in to comment.