diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-10-04 15:16:36 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-10-05 07:28:19 (GMT) |
commit | a891f20bc370c24777e22be40499e695f97738f9 (patch) | |
tree | 47b74e2fd752876a038fba29a73ff8a1491d057d /doc | |
parent | 488c4fd1137c5702d2a52e9c00053561b69bcdb5 (diff) | |
download | Qt-a891f20bc370c24777e22be40499e695f97738f9.zip Qt-a891f20bc370c24777e22be40499e695f97738f9.tar.gz Qt-a891f20bc370c24777e22be40499e695f97738f9.tar.bz2 |
Fix performance regression in QUuid::createUuid()
After commit 4363d4eebce4afd2ce3b3d6da205f8037357099a, createUuid()
would create a QFile, open it, read from it, and destroy it. This
resulted in a pretty serious performance regression (report says around
2000 times slower, I measured 3600 times slower on my machine).
This change creates one QFile per thread (since QFile is not thread
safe) and leaves the file open until the thread exits (at which point
QThreadStorage deletes the QFile).
This approach is around 600 times faster than the current code, which is
around 6 times slower than the original. Unfortunately, it is not
possible to restore the original performance without reintroducing the
problems that the commit mentioned above had fixed.
Benchmark is included.
Task-number: QTBUG-13877
Reviewed-by: thiago
Reviewed-by: mgoetz
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions