black/docs
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
..
_static Switch to Furo (#2793) 2022-01-21 15:00:13 -08:00
compatible_configs Update pylint config docs (#2931) 2022-03-16 10:00:30 -07:00
contributing Lazily import parallelized format modules 2022-08-26 21:11:00 -04:00
guides Convert index.rst and license.rst to markdown (#2852) 2022-03-30 13:43:46 -07:00
integrations Recommend using BlackConnect in IntelliJ IDEs (#3150) 2022-07-11 09:27:51 -07:00
the_black_code_style Stability policy: permit exceptional changes for unformatted code (#3155) 2022-07-06 13:33:07 -04:00
usage_and_configuration add preview option support for blackd (#3217) 2022-08-12 20:23:02 -07:00
authors.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
change_log.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
conf.py Update documentation dependencies (#3118) 2022-06-11 11:44:01 -04:00
faq.md Explain our use of mypyc in the FAQ (#3002) 2022-04-10 19:45:34 -04:00
getting_started.md Quote black[jupyter] and black[d] in installation docs (#3006) 2022-04-11 19:25:46 -04:00
index.md Convert index.rst and license.rst to markdown (#2852) 2022-03-30 13:43:46 -07:00
license.md Convert index.rst and license.rst to markdown (#2852) 2022-03-30 13:43:46 -07:00
make.bat add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Makefile Add EOF and trailing whitespace fixer to pre-commit config (#2330) 2021-06-13 10:22:46 -07:00
requirements.txt Bump sphinx from 5.1.0 to 5.1.1 in /docs (#3201) 2022-08-01 13:51:46 -04:00