Skip to content

string_processing: Performance regressionΒ #2314

@JelleZijlstra

Description

@JelleZijlstra
% time black --diff ~/some/file.py
All done! ✨ 🍰 ✨
1 file would be left unchanged.
black --diff ~/some/file.py  17.78s user 0.18s system 99% cpu 18.067 total
% time black --experimental-string-processing --diff ~/some/file.py
< many changes snipped >
would reformat /Users/jelle/some/file.py
All done! ✨ 🍰 ✨
1 file would be reformatted.
black --experimental-string-processing --diff   389.93s user 3.25s system 99% cpu 6:35.03 total

I can't share the file since it's private code, but it's 14000 lines of a single list display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: performanceBlack is too slow. Or too fast.C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.F: stringsRelated to our handling of strings

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions