From 20a2426ad6a90f7f3a5218e5fc6f3192e13d1d6f Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 6 Jul 2024 10:55:55 +0200 Subject: [PATCH] perf(GoogleDrive, WebDav): Don't loop through all lines when finding highest ID Signed-off-by: Marcel Klehr --- src/lib/adapters/GoogleDrive.ts | 5 +++-- src/lib/adapters/WebDav.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/adapters/GoogleDrive.ts b/src/lib/adapters/GoogleDrive.ts index da7fedbdfc..0a1c6ce9b7 100644 --- a/src/lib/adapters/GoogleDrive.ts +++ b/src/lib/adapters/GoogleDrive.ts @@ -249,14 +249,15 @@ export default class GoogleDriveAdapter extends CachingAdapter { /* let's get the highestId */ const byNL = xmlDocText.split('\n') - byNL.forEach(line => { + for (const line of byNL) { if (line.indexOf('