Explicitly create QDateTime with UTC time
ClosedPublic

Authored by broulik on Thu, Nov 29, 4:17 PM.

Details

Summary

Otherwise it spends half of the time doing timezone conversions to local time.

Test Plan
  • Copied a million files. Time spent in QDateTime::setMSecsSinceEpoch went from 44% to 0.1%, total time of addCopyInfoFromUDSEnty went from 57% to 36%, now the bottleneck is all that path concatenation causing URL decoding.
  • Verified that copied files still have correct mtime
  • Verified that "overwrite?" dialog still shows correct mtime

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Thu, Nov 29, 4:17 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Nov 29, 4:17 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Thu, Nov 29, 4:17 PM
dfaure accepted this revision.Thu, Nov 29, 4:37 PM

Yep, tzset is really slow. I suppose there are other similar lines of code in KIO that would benefit from the same fix? KFileItem for example?

This revision is now accepted and ready to land.Thu, Nov 29, 4:37 PM
This revision was automatically updated to reflect the committed changes.