black/docs/contributing/reference
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_classes.rst Fix autodoc refs broken by refactor (#2207) 2021-05-08 21:53:01 +02:00
reference_exceptions.rst Fix autodoc refs broken by refactor (#2207) 2021-05-08 21:53:01 +02:00
reference_functions.rst Lazily import parallelized format modules 2022-08-26 21:11:00 -04:00
reference_summary.rst Reorganize docs v2 (GH-2174) 2021-05-08 15:17:38 -04:00