Skip to content
Commit 346aa329 authored by David Faure's avatar David Faure
Browse files

More VCardTool performance by optimizing parseDateTime:

- use indexOf instead of split
- use remove instead of replace-with-empty
- use QLatin1Char('x') rather than QLatin1String("x") where possible
- don't call QDate::fromString to then sometimes throw the result away
- factorize multiple lookups into the string

Before: 174k instruction reads
After: 161k instruction reads
=> another 7% faster

But it goes down to 122k with a QDateTime fix, i.e. another 25% faster!
https://codereview.qt-project.org/180750

CCMAIL: kde-pim@kde.org
parent 610908a8
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