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>({
|
const changedConvoBatcher = createBatcher<ConversationModel>({
|
||||||
name: 'changedConvoBatcher',
|
name: 'changedConvoBatcher',
|
||||||
processBatch(batch) {
|
processBatch(batch) {
|
||||||
const deduped = Array.from(new Set(batch));
|
const deduped = new Set(batch);
|
||||||
window.log.info(
|
window.log.info(
|
||||||
'changedConvoBatcher: deduped ' +
|
'changedConvoBatcher: deduped ' +
|
||||||
`${batch.length} into ${deduped.length}`
|
`${batch.length} into ${deduped.size}`
|
||||||
);
|
);
|
||||||
|
|
||||||
deduped.forEach(conversation => {
|
deduped.forEach(conversation => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue