From 04256f674ac0f592b10df06db62512e230092420 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Sun, 11 Aug 2024 07:32:51 +0300 Subject: [PATCH] remove unnecessary helper improves readability at the cost of pushing and then immediate popping --- src/execution/IncrementalGraph.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/execution/IncrementalGraph.ts b/src/execution/IncrementalGraph.ts index 2fe86e7d11..67711130ab 100644 --- a/src/execution/IncrementalGraph.ts +++ b/src/execution/IncrementalGraph.ts @@ -309,19 +309,12 @@ export class IncrementalGraph { } } - private *_yieldCurrentCompletedIncrementalData( - first: IncrementalDataRecordResult, - ): Generator { - yield first; - yield* this.currentCompletedBatch(); - } - private _enqueue(completed: IncrementalDataRecordResult): void { + this._completedQueue.push(completed); const next = this._nextQueue.shift(); - if (next !== undefined) { - next(this._yieldCurrentCompletedIncrementalData(completed)); + if (next === undefined) { return; } - this._completedQueue.push(completed); + next(this.currentCompletedBatch()); } }