From 39f63b6339fcdd79c4aa6948fa724c0b41c23a25 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 30 Apr 2025 14:37:25 +0530 Subject: [PATCH] Remove thresholds since it is now just fs paths --- web/packages/gallery/services/video.ts | 8 ------ web/packages/new/photos/services/ml/worker.ts | 28 ++++++------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/web/packages/gallery/services/video.ts b/web/packages/gallery/services/video.ts index 8d5fe78667..9ce8c9c956 100644 --- a/web/packages/gallery/services/video.ts +++ b/web/packages/gallery/services/video.ts @@ -351,14 +351,6 @@ export const processVideoNewUpload = ( return; } - if (_state.videoProcessingQueue.length > 50) { - // Drop new requests if the queue can't keep up to avoid the app running - // out of memory by keeping hold of too many (potentially huge) video - // blobs. These items will later get processed as part of a backfill. - log.info("Will process new video upload later (backlog too big)"); - return; - } - // Enqueue the item. _state.videoProcessingQueue.push({ file, diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.ts index adc996d642..58dbe4384e 100644 --- a/web/packages/new/photos/services/ml/worker.ts +++ b/web/packages/new/photos/services/ml/worker.ts @@ -185,26 +185,14 @@ export class MLWorker { onUpload(file: EnteFile, processableUploadItem: ProcessableUploadItem) { // Add the recently uploaded file to the live indexing queue. // - // Limit the queue to some maximum so that we don't keep growing - // indefinitely (and cause memory pressure) if the speed of uploads is - // exceeding the speed of indexing. - // - // In general, we can be sloppy with the items in the live queue (as - // long as we're not systematically ignoring it). This is because the - // live queue is just an optimization: if a file doesn't get indexed via - // the live queue, it'll later get indexed anyway when we backfill. - if (this.liveQ.length < 200) { - // The file is just being uploaded, and so will not have any - // pre-existing ML data on remote. - this.liveQ.push({ - file, - processableUploadItem, - remoteMLData: undefined, - }); - this.wakeUp(); - } else { - log.debug(() => "Ignoring upload item since liveQ is full"); - } + // We can unconditionally process it since the file is just being + // uploaded, and so will not have any pre-existing ML data on remote. + this.liveQ.push({ + file, + processableUploadItem, + remoteMLData: undefined, + }); + this.wakeUp(); } /**