D9983: Don't stat(/etc/localtime) between read() and write() copying files
Jaime Torres Amate
noreply at phabricator.kde.org
Fri Jan 19 16:34:54 UTC 2018
jtamate created this revision.
jtamate added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.
jtamate requested review of this revision.
REVISION SUMMARY
CCBUG: 384561
Unfortunately, QDateTime::currentDateTime() checks /etc/localtime
each time it is called.
Chaning to QElapsedTime, no check of /etc/localtime.
Reproducing bug 384561, the strace of file.so was something like:
read(), stat(/etc/localtime), stat(/etc/localtime),
stat(/etc/localtime), stat(/etc/localtime), stat(/etc/localtime),
write(), read() ......
Now it is: read(), write()
It also reduces the cpu in io/wait around 10% in a debug build.
TEST PLAN
kio tests work as before
desktop: works in dolphin
REPOSITORY
R241 KIO
BRANCH
timer (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D9983
AFFECTED FILES
src/core/slavebase.cpp
To: jtamate, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180119/365d35df/attachment.html>
More information about the Kde-frameworks-devel
mailing list