Skip to content

Commit

Permalink
just look at the first 100 scored and sorted local suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Sep 27, 2024
1 parent 5b59c27 commit 22a991e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Suggestions/SuggestionProcessing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22a991e

Please sign in to comment.