Only touch endpoints of same topic when matching
Maintain an index of all entities on (kind, topic, GUID) in addition to the concurrent hash table on GUID and use that when looking for matching entities. For endpoint matching, restrict the scan to readers/writers of the right topic, for regular iterators, restrict it to the range of the correct entity kind. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
52d6e0be26
commit
2dfde4bf0d
14 changed files with 355 additions and 177 deletions
|
@ -257,10 +257,12 @@ void dds__builtin_init (struct dds_domain *dom)
|
|||
dom->builtin_reader_topic = new_sertopic_builtintopic (DSBT_READER, "DCPSSubscription", "org::eclipse::cyclonedds::builtin::DCPSSubscription", &dom->gv);
|
||||
dom->builtin_writer_topic = new_sertopic_builtintopic (DSBT_WRITER, "DCPSPublication", "org::eclipse::cyclonedds::builtin::DCPSPublication", &dom->gv);
|
||||
|
||||
thread_state_awake (lookup_thread_state (), &dom->gv);
|
||||
const struct ephash *gh = dom->gv.guid_hash;
|
||||
dom->builtintopic_writer_participant = new_local_orphan_writer (&dom->gv, to_entityid (NN_ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER), dom->builtin_participant_topic, qos, builtintopic_whc_new (DSBT_PARTICIPANT, gh));
|
||||
dom->builtintopic_writer_publications = new_local_orphan_writer (&dom->gv, to_entityid (NN_ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER), dom->builtin_writer_topic, qos, builtintopic_whc_new (DSBT_WRITER, gh));
|
||||
dom->builtintopic_writer_subscriptions = new_local_orphan_writer (&dom->gv, to_entityid (NN_ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER), dom->builtin_reader_topic, qos, builtintopic_whc_new (DSBT_READER, gh));
|
||||
thread_state_asleep (lookup_thread_state ());
|
||||
|
||||
dds_delete_qos (qos);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_bswap.h"
|
||||
#include "dds__writer.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "dds/ddsi/q_config.h"
|
||||
#include "dds/ddsi/q_plist.h"
|
||||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
#include "dds/version.h"
|
||||
#include "dds__init.h"
|
||||
#include "dds__domain.h"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "dds/ddsi/q_globals.h"
|
||||
#include "dds__builtin.h"
|
||||
#include "dds/ddsi/ddsi_sertopic.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
|
||||
DECL_ENTITY_LOCK_UNLOCK (extern inline, dds_reader)
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "dds__serdata_builtintopic.h"
|
||||
#include "dds/ddsi/ddsi_tkmap.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
|
||||
static const uint64_t unihashconsts[] = {
|
||||
UINT64_C (16292676669999574021),
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "dds__get_status.h"
|
||||
#include "dds__qos.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/ddsi_sertopic.h"
|
||||
#include "dds/ddsi/q_ddsi_discovery.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_thread.h"
|
||||
#include "dds/ddsi/q_xmsg.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
#include "dds__writer.h"
|
||||
#include "dds__listener.h"
|
||||
#include "dds__init.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "dds/version.h"
|
||||
#include "dds__entity.h"
|
||||
#include "dds/ddsi/q_entity.h"
|
||||
#include "dds/ddsi/q_ephash.h"
|
||||
#include "dds/ddsrt/cdtors.h"
|
||||
#include "dds/ddsrt/misc.h"
|
||||
#include "dds/ddsrt/process.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue