aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-11-01 09:33:06 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-11-09 17:24:04 +0000
commitc5e1b19db1315036d0735b1722b1ef8df42c4d16 (patch)
tree101aeef53d35254879a4641150c8ef09a62bd19c
parent448a2ff6dbf1511fbe660d73034140e1efb97830 (diff)
Use string sharing when storing the propertiers of rescuable artifacts
We mindlessly dumped the properties into the datastream directly, causing the size of the build graph to temporarily grow by an order of magnitude. Change-Id: Iee09cb6608443aec65b799ca9a9afe98098619f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/buildgraph/rescuableartifactdata.cpp5
-rw-r--r--src/lib/corelib/tools/persistence.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/rescuableartifactdata.cpp b/src/lib/corelib/buildgraph/rescuableartifactdata.cpp
index c87a16f43..65af1b176 100644
--- a/src/lib/corelib/buildgraph/rescuableartifactdata.cpp
+++ b/src/lib/corelib/buildgraph/rescuableartifactdata.cpp
@@ -70,7 +70,7 @@ void RescuableArtifactData::load(PersistentPool &pool)
propertiesRequestedFromArtifactInPrepareScript = restorePropertyHash(pool);
commands = loadCommandList(pool);
pool.stream() >> fileTags;
- pool.stream() >> properties;
+ properties = pool.loadVariantMap();
}
void RescuableArtifactData::store(PersistentPool &pool) const
@@ -89,7 +89,8 @@ void RescuableArtifactData::store(PersistentPool &pool) const
storePropertySet(pool, propertiesRequestedInCommands);
storePropertyHash(pool, propertiesRequestedFromArtifactInPrepareScript);
storeCommandList(commands, pool);
- pool.stream() << fileTags << properties;
+ pool.stream() << fileTags;
+ pool.store(properties);
}
} // namespace Internal
diff --git a/src/lib/corelib/tools/persistence.cpp b/src/lib/corelib/tools/persistence.cpp
index 72d362d91..fb4dbf70e 100644
--- a/src/lib/corelib/tools/persistence.cpp
+++ b/src/lib/corelib/tools/persistence.cpp
@@ -50,7 +50,7 @@
namespace qbs {
namespace Internal {
-static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-90";
+static const char QBS_PERSISTENCE_MAGIC[] = "QBSPERSISTENCE-91";
PersistentPool::PersistentPool(Logger &logger) : m_logger(logger)
{