[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows -Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Steve Dower
Steve Dower added the comment: > Note that CopyFileEx() is a high-level Windows API function, not a "kernel > mode" copy. This is true today, but could change whenever Windows feels like changing it. If we switch to the native API then we'll get any advantage there automatically. The only c

[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Eryk Sun
Eryk Sun added the comment: > In Windows there is an fast API to copy file in kernel mode: CopyFile The possibility of calling CopyFileEx() for shutil.copy2() is discussed in issue 30044. Note that CopyFileEx() is a high-level Windows API function, not a "kernel mode" copy. It opens the sour

[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

[issue44579] shutil.copy() inefficient implementation in Windows

2021-07-07 Thread sfmc
New submission from sfmc : In Windows shutil.copy() uses _copyfileobj_readinto which copies file in user mode. In Windows there is an fast API to copy file in kernel mode: CopyFile (see https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile). -- components: Lib