Skip to content

Using atomicwrites on Unix causes slowdown via fsync on the dir #6147

@blueyed

Description

@blueyed

In aa95a42 (via #3390) atomicwrites was added to fix an issue on Windows (to fix #3008).

It does not appear to have been necessary for non-Windows systems, and is actually causing a slowdown there (pytest --collect-only: 5s => 8s on pytest's repo, with cleaned .pyc files of course).

The problem is that it calls fsync on the dir, which is not really necessary (untitaker/python-atomicwrites#17 (comment)).

I think we should revert / change this to only use atomicwrites on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions