On Thu, Oct 21, 2010 at 4:10 AM, Cedric BAIL <cedric.b...@free.fr> wrote:
> On Wed, Oct 20, 2010 at 7:20 PM, Gustavo Sverzut Barbieri
> <barbi...@profusion.mobi> wrote:
>> On Wed, Oct 20, 2010 at 2:42 PM, Enlightenment SVN
>> <no-re...@enlightenment.org> wrote:
>>> Log:
>>>        * eio: add eio_file_chmod and eio_file_chown.
>>
>> Okay, we're in a thread, but recursive operations should use the "at"
>> variants to speed them up. Would you mind implementing them as well
>> (using your code as fallback when they are not available)?  It's
>> basically dirfd(DIR *d) then use this as parameter for openat(),
>> unlinkat(), ...  I'm also following systemd and see they're
>> effectively using it for good! (may also be used as a good source of
>> examples git://anongit.freedesktop.org/systemd)
>
> I am not really sure how much it could help. As we need to separate
> the listing stage from the action, so that we can send progress
> information. I will look how we can use that, but I don't expect
> something really useful here.

still the actual operation is on the thread and recursively walking
directories is faster as a good amount of the path is already
resolved, you just incrementally use another point. If you have
/a/b/c/d/e/f, to walk to /a/b/c/d/e/f/g the kernel needs to resolve
the other paths AGAIN. With *at variants it does not.

I did not check the path construction, but likely you can use the
techniques such as I've used in e17 and other places: you know the
prefix size, you know NAME_MAX, then you know what to allocate before
then memcpy, bit faster than asprintf() or snprintf() + strdup().


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to