From 5803db08e55ed9287dc59b3adc281b89c52c530f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 24 Feb 2019 22:04:16 -0800 Subject: fixes #461 Context support for SUB fixes #762 Pub/Sub very slow compared with nanomsg This introduces contexts for SUB, and converts both the cooked SUB and PUB protocols to use a new lightweight message queue that has significant performance benefits over the heavy-weight message queue. We've also added a test program, pubdrop, in the perf directory, which can be used for measuring pub/sub message rates and drop rates. Note that its quite easy to overwhelm a subscriber still. The SUB socket performance is still not completely where it needs to be. There are two remainging things to improve. Firsst we need to replace the naive linked list of topics with a proper PATRICIA trie. Second, we need to work on the low level POSIX poller code. (The Windows code is already quite good, and we outperform nanomsg on Windows.) --- src/core/nng_impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/nng_impl.h') diff --git a/src/core/nng_impl.h b/src/core/nng_impl.h index 07fe44f5..0dcc976f 100644 --- a/src/core/nng_impl.h +++ b/src/core/nng_impl.h @@ -33,6 +33,7 @@ #include "core/idhash.h" #include "core/init.h" #include "core/list.h" +#include "core/lmq.h" #include "core/message.h" #include "core/msgqueue.h" #include "core/options.h" -- cgit v1.2.3-70-g09d2