Use longer delay when batch processing incoming messages.

// FREEBIE
pull/1/head
Matthew Chen 7 years ago
parent 69c9a5a49b
commit 0a081f7dcc

@ -317,6 +317,9 @@ NSString *const OWSMessageContentJobFinderExtensionGroup = @"OWSMessageContentJo
{
AssertOnDispatchQueue(self.serialQueue);
// We want a value that is just high enough to yield perf benefits.
const NSUInteger kIncomingMessageBatchSize = 16;
NSArray<OWSMessageContentJob *> *jobs = [self.finder nextJobsForBatchSize:kIncomingMessageBatchSize];
OWSAssert(jobs);
if (jobs.count < 1) {

@ -4,8 +4,6 @@
NS_ASSUME_NONNULL_BEGIN
extern const NSUInteger kIncomingMessageBatchSize;
@class OWSSignalServiceProtosContent;
@class OWSSignalServiceProtosDataMessage;
@class OWSSignalServiceProtosEnvelope;

@ -7,15 +7,6 @@
NS_ASSUME_NONNULL_BEGIN
// We need to use a consistent batch size throughout
// the incoming message pipeline (i.e. in the
// "decrypt" and "process" steps), or the pipeline
// doesn't flow smoothly.
//
// We want a value that is just high enough to yield
// perf benefits. The right value is probably 5-15.
const NSUInteger kIncomingMessageBatchSize = 10;
// used in log formatting
NSString *envelopeAddress(OWSSignalServiceProtosEnvelope *envelope)
{

Loading…
Cancel
Save