Decrease batcher wait time to speed up startup
This commit is contained in:
parent
6f7ecb141f
commit
5c8cb6b89b
2 changed files with 5 additions and 5 deletions
|
@ -205,7 +205,7 @@ class MessageReceiverInner extends EventTarget {
|
||||||
|
|
||||||
this.cacheAddBatcher = createBatcher<CacheAddItemType>({
|
this.cacheAddBatcher = createBatcher<CacheAddItemType>({
|
||||||
name: 'MessageReceiver.cacheAddBatcher',
|
name: 'MessageReceiver.cacheAddBatcher',
|
||||||
wait: 200,
|
wait: 75,
|
||||||
maxSize: 30,
|
maxSize: 30,
|
||||||
processBatch: (items: Array<CacheAddItemType>) => {
|
processBatch: (items: Array<CacheAddItemType>) => {
|
||||||
// Not returning the promise here because we don't want to stall
|
// Not returning the promise here because we don't want to stall
|
||||||
|
@ -215,13 +215,13 @@ class MessageReceiverInner extends EventTarget {
|
||||||
});
|
});
|
||||||
this.cacheUpdateBatcher = createBatcher<CacheUpdateItemType>({
|
this.cacheUpdateBatcher = createBatcher<CacheUpdateItemType>({
|
||||||
name: 'MessageReceiver.cacheUpdateBatcher',
|
name: 'MessageReceiver.cacheUpdateBatcher',
|
||||||
wait: 500,
|
wait: 75,
|
||||||
maxSize: 30,
|
maxSize: 30,
|
||||||
processBatch: this.cacheUpdateBatch.bind(this),
|
processBatch: this.cacheUpdateBatch.bind(this),
|
||||||
});
|
});
|
||||||
this.cacheRemoveBatcher = createBatcher<string>({
|
this.cacheRemoveBatcher = createBatcher<string>({
|
||||||
name: 'MessageReceiver.cacheRemoveBatcher',
|
name: 'MessageReceiver.cacheRemoveBatcher',
|
||||||
wait: 500,
|
wait: 75,
|
||||||
maxSize: 30,
|
maxSize: 30,
|
||||||
processBatch: this.cacheRemoveBatch.bind(this),
|
processBatch: this.cacheRemoveBatch.bind(this),
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { createWaitBatcher } from './waitBatcher';
|
||||||
|
|
||||||
const updateMessageBatcher = createBatcher<MessageAttributesType>({
|
const updateMessageBatcher = createBatcher<MessageAttributesType>({
|
||||||
name: 'messageBatcher.updateMessageBatcher',
|
name: 'messageBatcher.updateMessageBatcher',
|
||||||
wait: 500,
|
wait: 75,
|
||||||
maxSize: 50,
|
maxSize: 50,
|
||||||
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
||||||
window.log.info('updateMessageBatcher', messageAttrs.length);
|
window.log.info('updateMessageBatcher', messageAttrs.length);
|
||||||
|
@ -33,7 +33,7 @@ export function setBatchingStrategy(keepBatching = false): void {
|
||||||
|
|
||||||
export const saveNewMessageBatcher = createWaitBatcher<MessageAttributesType>({
|
export const saveNewMessageBatcher = createWaitBatcher<MessageAttributesType>({
|
||||||
name: 'messageBatcher.saveNewMessageBatcher',
|
name: 'messageBatcher.saveNewMessageBatcher',
|
||||||
wait: 500,
|
wait: 75,
|
||||||
maxSize: 30,
|
maxSize: 30,
|
||||||
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
||||||
window.log.info('saveNewMessageBatcher', messageAttrs.length);
|
window.log.info('saveNewMessageBatcher', messageAttrs.length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue