summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-01 22:40:05 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-01 22:40:05 +0100
commit2c80424031c195333cfa6785ea7ab57dc9613fa3 (patch)
tree9e4a0bc1dc83224aae67661a74a85dabe1aeca98 /common/resourceaccess.h
parent2dfa85df6cf46dc2a5ee0c6bf69aa030b19a8435 (diff)
downloadsink-2c80424031c195333cfa6785ea7ab57dc9613fa3.tar.gz
sink-2c80424031c195333cfa6785ea7ab57dc9613fa3.zip
Cache ResourceAccess instances.
We want one connection per application per resource instance. With this change the connection is maintained for the lifetime of the client process (it should probably time out instead), but we at least avoid creating a connection per operation/query, which results in a significant performance boost (~10% for reading, 90% for writing in dummyresourcebenchmark).
Diffstat (limited to 'common/resourceaccess.h')
-rw-r--r--common/resourceaccess.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/resourceaccess.h b/common/resourceaccess.h
index e87a1f7..527cfa3 100644
--- a/common/resourceaccess.h
+++ b/common/resourceaccess.h
@@ -63,6 +63,8 @@ class ResourceAccess : public ResourceAccessInterface
63{ 63{
64 Q_OBJECT 64 Q_OBJECT
65public: 65public:
66 typedef QSharedPointer<ResourceAccess> Ptr;
67
66 ResourceAccess(const QByteArray &resourceName); 68 ResourceAccess(const QByteArray &resourceName);
67 ~ResourceAccess(); 69 ~ResourceAccess();
68 70