diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-28 22:29:35 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-28 22:29:35 +0200 |
commit | a24bf3db83d81d7d7677a1f0f750f208d32998a8 (patch) | |
tree | 0d3fa9da24d706c2e6b03e8bf0fd74a434ae871f /common/storage/key.cpp | |
parent | 683ee2ec1d198a9f19572e42d78fa0b9939d7f10 (diff) | |
download | sink-a24bf3db83d81d7d7677a1f0f750f208d32998a8.tar.gz sink-a24bf3db83d81d7d7677a1f0f750f208d32998a8.zip |
Avoid unnecessary Identifier conversions in performance ciritical code.
This fixes the performance regressions to a state where we are roughly
at the same performance as pre Identifier (but not any better either).
Diffstat (limited to 'common/storage/key.cpp')
-rw-r--r-- | common/storage/key.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/storage/key.cpp b/common/storage/key.cpp index 23d7a6a..2327061 100644 --- a/common/storage/key.cpp +++ b/common/storage/key.cpp | |||
@@ -26,6 +26,12 @@ using Sink::Storage::Identifier; | |||
26 | using Sink::Storage::Key; | 26 | using Sink::Storage::Key; |
27 | using Sink::Storage::Revision; | 27 | using Sink::Storage::Revision; |
28 | 28 | ||
29 | |||
30 | uint Sink::Storage::qHash(const Sink::Storage::Identifier &identifier) | ||
31 | { | ||
32 | return qHash(identifier.toInternalByteArray()); | ||
33 | } | ||
34 | |||
29 | QDebug &operator<<(QDebug &dbg, const Identifier &id) | 35 | QDebug &operator<<(QDebug &dbg, const Identifier &id) |
30 | { | 36 | { |
31 | dbg << id.toDisplayString(); | 37 | dbg << id.toDisplayString(); |