tiny speedup in shutil fast copy on Windows by landfillbaby · Pull Request #28898 · python/cpython · GitHub
Skip to content

tiny speedup in shutil fast copy on Windows - #28898

Closed
landfillbaby wants to merge 2 commits into
python:mainfrom
landfillbaby:patch-1
Closed

landfillbaby wants to merge 2 commits into
python:mainfrom
landfillbaby:patch-1

Conversation

@landfillbaby

Copy link
Copy Markdown
Contributor

can't see why the final write was doing a 2nd lookup of fdst.write

@the-knights-who-say-ni

Copy link
Copy Markdown

@landfillbaby

landfillbaby commented Oct 12, 2021

Copy link
Copy Markdown
Contributor Author

do i really need to sign the CLA for a single byte of changes? can't i just say it's WTFPL or something
edit: ok fine i did it

@landfillbaby

landfillbaby commented Oct 13, 2021

Copy link
Copy Markdown
Contributor Author

yeah looking at the original PRs that added this stuff, #7160 and #7681, it seems like without the with statements there's no proper memoryview deallocation, and a CopyFile[Ex]W implementation was reverted due to those functions copying too much with no flag to disable it (metadata, forks, etc)

@landfillbaby

Copy link
Copy Markdown
Contributor Author

i also just noticed it attempts a 2nd read after the case where output is less than the buffer size. unless that's intended i'm adding a break

@github-actions

Copy link
Copy Markdown

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants