[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    Re: [Python-Dev] stuck issue 26826
From:       Marcos Dione <mdione () grulic ! org ! ar>
Date:       2016-08-03 20:32:55
Message-ID: 20160803203255.wcf6h42v364pjgqw () diablo ! grulicueva ! local
[Download RAW message or body]

On Wed, Aug 03, 2016 at 11:31:46AM -0700, Guido van Rossum wrote:
> 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?

    At kernel level: clearly yes, otherwise their BDFL would noy allow
those[1] patches to go in.

    Now, should/could Python benefit from them? I personally think so,
that it should. That's why I developed the patch in the first place. As
for the cost, in terms of maintainability, I just noticed that copy() and
copy2() use copyfile(), and that copytree() uses copy2(), so only one
function should be modified. True, the code will be ~50% more complex
(it needs to check the availability of the function and the suitability
for the parameters given; copy_file_range() only works on files on the
same filesystem[1]). Hmm...

    Maybe you're right. Maybe, to keep Python's own code simple, we could
skip these optimizations, and leave them in a 3rd party module.

--
[1] I still don't understand why all these optimizations are exposed
separately for the specific cases in which they work; I would expect one
function that would take care of the details, but at least provide copy
functionality without using user space buffers but kernel ones. But then,
I'm not a kernel developer, just a puny Python one...
-- 
(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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-marcsub-zyf4%40marc.info
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic