
Then again are people really concerned about the speed of those file copy functions? Or are we just offering a solution in search of a problem? (I honestly don't know. At Dropbox we don't use Python for scripting much, we use it to write dynamic web servers. Static files are served by a CDN so e.g. sendfile() is not interesting to us either.) On Wed, Aug 3, 2016 at 11:16 AM, Marcos Dione <mdione@grulic.org.ar> wrote:
On Wed, Aug 03, 2016 at 10:46:13AM -0700, Guido van Rossum wrote:
I wonder if the issue isn't that there are so many Linux syscalls that we probably should have a process for deciding which ones are worth supporting in the os module, and that process should not necessarily start with a patch review. [...] Certainly it's not rocket science to write a C extension module that wraps a syscall or a bunch of them.
I agree, but also notice that some of these syscalls, specially those which are optimizations for certain situations like this one or sendfile(), could also be used by the rest of python's core modules if they're available. In this case in particular, it could be used to speed up copyfile(), copy(), copy2() and probably copytree() from the shutil module. In fact, if this patch goes in, I'm planning to implement such optimizations.
-- (Not so) Random fortune: Terrorism isn't a crime against people or property. It's a crime against our minds, using the death of innocents and destruction of property to make us fearful. -- Bruce Schneier
-- --Guido van Rossum (python.org/~guido)