From 2f7bef547e51ee6f2fe8f12bbe33f4978d6bd7f2 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Sat, 28 Dec 2013 15:43:09 +0100 Subject: Optimize: Use property-indices instead of names for notifications. This reduces the traffic as the indices are usually much smaller than the property names. As such, the benchPropertyUpdates gets a speed boost of about 9% (or 10ms vs. 11ms). As we need to transmit the index during initialization that degrades its performance slightly by ca. 4% (13ms vs. 12.5ms). Considering that the initialization only takes place once whereas the property updates potentially often, this is a good tradeoff. Change-Id: If7df3e360f1528b7d7aa26c63ce851363ae9fd6a Reviewed-by: Simon Hausmann --- src/webchannel/qmetaobjectpublisher_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/webchannel/qmetaobjectpublisher_p.h') diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h index 969421a..4df5b38 100644 --- a/src/webchannel/qmetaobjectpublisher_p.h +++ b/src/webchannel/qmetaobjectpublisher_p.h @@ -153,9 +153,9 @@ struct Q_WEBCHANNEL_EXPORT QMetaObjectPublisherPrivate // Map the registered objects to their id. QHash registeredObjectIds; - // Map of object names to maps of signal indices to a set of all their properties. + // Map of objects to maps of signal indices to a set of all their property indices. // The last value is a set as a signal can be the notify signal of multiple properties. - typedef QHash > SignalToPropertyNameMap; + typedef QHash > SignalToPropertyNameMap; QHash signalToPropertyMap; // Objects that changed their properties and are waiting for idle client. -- cgit v1.2.1