black/docs/contributing
Richard Si e269f44b25 Lazily import parallelized format modules
`black.reformat_many` depends on a lot of slow-to-import modules. When
formatting simply a single file, the time paid to import those modules
is totally wasted. So I moved `black.reformat_many` and its helpers
to `black.concurrency` which is now *only* imported if there's more
than one file to reformat. This way, running Black over a single file
is snappier

Here are the numbers before and after this patch running `python -m
black --version`:

- interpreted: 411 ms +- 9 ms -> 342 ms +- 7 ms: 1.20x faster
- compiled: 365 ms +- 15 ms -> 304 ms +- 7 ms: 1.20x faster

Co-authored-by: Fabio Zadrozny <fabiofz@gmail.com>
2022-08-26 21:11:00 -04:00
..
reference Lazily import parallelized format modules 2022-08-26 21:11:00 -04:00
gauging_changes.md Enforce no formatting changes for PRs via CI (GH-2951) 2022-03-26 17:22:38 -04:00
index.md Convert index.rst and license.rst to markdown (#2852) 2022-03-30 13:43:46 -07:00
issue_triage.md Include Jelle's review suggestions 2021-05-16 18:24:28 +02:00
release_process.md separate CHANGELOG section for preview style (#2890) 2022-02-23 18:32:00 -08:00
the_basics.md black-primer: stop running it (#2809) 2022-01-26 17:18:43 -08:00