mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
Assistant: Avoid creating unnecessary FileResult objects
A BinaryHeap is now used to keep track of the 6 highest scoring files. This ensures that a FileResult is not created for a result that will never be displayed.
This commit is contained in:
parent
4043c89310
commit
6ecff2ac28
3 changed files with 19 additions and 5 deletions
|
@ -18,6 +18,8 @@
|
|||
|
||||
namespace Assistant {
|
||||
|
||||
static constexpr size_t MAX_SEARCH_RESULTS = 6;
|
||||
|
||||
class Result : public RefCounted<Result> {
|
||||
public:
|
||||
virtual ~Result() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue