Consumers with many filtered subjects and large streams could suffer from slow creation times due to NumPending() being called for all filtered subjects.
This improvement is similar to the LoadNextMsgMulti for consumers with large number of filtered subjects.
Also fixed a bug in normal NumPending for memstore.
Consumers with many filtered subjects and large streams could suffer from slow creation times due to NumPending() being called for all filtered subjects.
This improvement is similar to the LoadNextMsgMulti for consumers with large number of filtered subjects.
Also fixed a bug in normal NumPending for memstore.
Signed-off-by: Derek Collison derek@nats.io