Don't create an unnecessary array in conversation batcher
This commit is contained in:
parent
805eab6878
commit
e77dcf7f85
1 changed files with 2 additions and 2 deletions
|
@ -879,10 +879,10 @@ export async function startApp(): Promise<void> {
|
|||
const changedConvoBatcher = createBatcher<ConversationModel>({
|
||||
name: 'changedConvoBatcher',
|
||||
processBatch(batch) {
|
||||
const deduped = Array.from(new Set(batch));
|
||||
const deduped = new Set(batch);
|
||||
window.log.info(
|
||||
'changedConvoBatcher: deduped ' +
|
||||
`${batch.length} into ${deduped.length}`
|
||||
`${batch.length} into ${deduped.size}`
|
||||
);
|
||||
|
||||
deduped.forEach(conversation => {
|
||||
|
|
Loading…
Add table
Reference in a new issue