bruns added inline comments. INLINE COMMENTS
> copyjob.cpp:2199 > +#if HAVE_SYS_XATTR_H && !defined(__stub_getxattr) > + ssize_t listlen = listxattr(xattrsrc, nullptr, 0); > +#elif defined(Q_OS_MAC) you can (typically) avoid the double (syscall, i.e. expensive) by preallocating the array and only reallocating if you get `errno == ERANGE`. Dito for getxattr. > copyjob.cpp:2221 > + QList<QByteArray> xattrkeys = keylist.split('\0'); > + xattrkeys.removeLast(); // the last item is alwys empty > + `... always ...` > copyjob.cpp:2225 > + // get the size of value for key > +#if HAVE_SYS_XATTR_H && !defined(__stub_getxattr) > + ssize_t valuelen = getxattr(xattrsrc, xattrkey.constData(), nullptr, > 0); There should probably be a `if (!xattrkey.startsWith("user.")) continue;` here. > copyjob.cpp:2226 > +#if HAVE_SYS_XATTR_H && !defined(__stub_getxattr) > + ssize_t valuelen = getxattr(xattrsrc, xattrkey.constData(), nullptr, > 0); > +#elif defined(Q_OS_MAC) getxattr is called on the same file again and again, thus it is much more efficient to use fgetxattr. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D17816 To: cochise, dfaure Cc: bruns, phidrho, dhaumann, funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, nicolasfella, kde-frameworks-devel, michaelh