From 22a991ee0dcb503cf7c260ad4e0857eab7238918 Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Fri, 27 Sep 2024 13:37:06 +0100 Subject: [PATCH] just look at the first 100 scored and sorted local suggestions --- Sources/Suggestions/SuggestionProcessing.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Suggestions/SuggestionProcessing.swift b/Sources/Suggestions/SuggestionProcessing.swift index 2425a0ed5..b0ff5eacb 100644 --- a/Sources/Suggestions/SuggestionProcessing.swift +++ b/Sources/Suggestions/SuggestionProcessing.swift @@ -58,7 +58,8 @@ final class SuggestionProcessing { } // Get best matches from history and bookmarks - let allLocalSuggestions = localSuggestions(from: history, bookmarks: bookmarks, internalPages: internalPages, openTabs: openTabs, query: query) + let allLocalSuggestions = Array(localSuggestions(from: history, bookmarks: bookmarks, internalPages: internalPages, openTabs: openTabs, query: query) + .prefix(100)) // temporary optimsiation // Combine HaB and domains into navigational suggestions and remove duplicates let navigationalSuggestions = allLocalSuggestions + duckDuckGoDomainSuggestions