Skip to content

Ultra slow path conversion #323

Description

@dragon-archer

I've encountered several ultra slow path conversions under MSYS2, see the following example:

$ which python
/clang64/bin/python

$ time python -c "import sys; print(sys.argv)" "/c"
['-c', 'C:/']
python -c "import sys; print(sys.argv)" "/c"  0.01s user 0.00s system 37% cpu 0.040 total

$ time python -c "import sys; print(sys.argv)" "/\c"
['-c', '//c']
python -c "import sys; print(sys.argv)" "/\c"  0.01s user 0.00s system 0% cpu 2.753 total

I've tried the example several times under different shells (bash, zsh, etc.), seems the problem comes from msys2 itself

P.S.: my MSYS2_ARG_CONV_EXCL is unset

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions