summaryrefslogtreecommitdiffstats
path: root/common/storage/key.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-28 22:29:35 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-28 22:29:35 +0200
commita24bf3db83d81d7d7677a1f0f750f208d32998a8 (patch)
tree0d3fa9da24d706c2e6b03e8bf0fd74a434ae871f /common/storage/key.cpp
parent683ee2ec1d198a9f19572e42d78fa0b9939d7f10 (diff)
downloadsink-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.cpp6
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;
26using Sink::Storage::Key; 26using Sink::Storage::Key;
27using Sink::Storage::Revision; 27using Sink::Storage::Revision;
28 28
29
30uint Sink::Storage::qHash(const Sink::Storage::Identifier &identifier)
31{
32 return qHash(identifier.toInternalByteArray());
33}
34
29QDebug &operator<<(QDebug &dbg, const Identifier &id) 35QDebug &operator<<(QDebug &dbg, const Identifier &id)
30{ 36{
31 dbg << id.toDisplayString(); 37 dbg << id.toDisplayString();