Skip to content
Commit 8d73867b authored by Jaime Torres Amate's avatar Jaime Torres Amate
Browse files

Don't stat(/etc/localtime) between read() and write() copying files

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

Reviewers: #frameworks, fvogt, dfaure

Reviewed By: dfaure

Subscribers: fvogt, ngraham

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9983
parent e6611ca7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment