Decrease batcher wait time to speed up startup

This commit is contained in:
Fedor Indutny 2021-03-30 09:56:03 -07:00 committed by Josh Perez
parent 6f7ecb141f
commit 5c8cb6b89b
2 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import { createWaitBatcher } from './waitBatcher';
const updateMessageBatcher = createBatcher<MessageAttributesType>({
name: 'messageBatcher.updateMessageBatcher',
wait: 500,
wait: 75,
maxSize: 50,
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
window.log.info('updateMessageBatcher', messageAttrs.length);
@ -33,7 +33,7 @@ export function setBatchingStrategy(keepBatching = false): void {
export const saveNewMessageBatcher = createWaitBatcher<MessageAttributesType>({
name: 'messageBatcher.saveNewMessageBatcher',
wait: 500,
wait: 75,
maxSize: 30,
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
window.log.info('saveNewMessageBatcher', messageAttrs.length);