sbdchd / neoformat

:sparkles: A (Neo)vim plugin for formatting code.
BSD 2-Clause "Simplified" License
1.99k stars 189 forks source link

Extremely slow when using Black on large files #426

Open Hubro opened 2 years ago

Hubro commented 2 years ago

Using Black on a large Python file with Neoformat is extremely slow.

If the contents of the file doesn't require reformatting, :Neoformat black returns "no change necessary" in 3-400 ms, just like black in the command line. However, if I add an extra empty line so the file has to be reformatted, running the same command takes 3-4 full seconds. This is a massive pain to wait for every time I save the file.

Using the official Black plugin instead, reformatting takes pretty much exactly as long as it does when running Black through the command line, i.e. 3-400 ms.

YuCao16 commented 1 year ago

Same here

alecandido commented 1 year ago

Something similar is happening also with prettier.

long2ice commented 1 year ago

Same here

nicolasaunai commented 1 year ago

still very slow