-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve search performance (caching, cancellation, parallel search) #460
Conversation
This is an awesome work. Thank you! I'll be going over and cherry-picking commits individually shortly. I wish GitHub could create series of PRs like Gerrit does. |
src/registry/docset.cpp
Outdated
@@ -412,6 +472,7 @@ void Docset::countSymbols() | |||
const QString symbolType = parseSymbolType(symbolTypeStr); | |||
m_symbolStrings.insertMulti(symbolType, symbolTypeStr); | |||
m_symbolCounts[symbolType] += query.value(1).toInt(); | |||
m_symbolsTotal += query.value(1).toInt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this being used anywhere...
492234b
to
4bf9f36
Compare
Made changes to the PR. I rolled back changes I made with regards to pointers. |
****************************************************************************/ | ||
|
||
#include "cachingsearchstrategy.h" | ||
#include "docset.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please sort alphabetically, adding an empty line after cachingsearchstrategy.h
.
8f288b8
to
f587761
Compare
Another update |
@drognanar Any updates here? I can rebase this if you don't have the time. |
@trollixx @drognanar what needs to happen to move this along? Fuzzy searching is waiting on this. |
Add query cancellation at a docset level. This allows the query to be cancelled midway a large docset run. Add caching to docset results. This should limit the number of items to search through for longer queries.
I've been going over this multiple times, and the implementation details seem very counterintuitive to me. Exposing docset internals outside of I am really not comfortable with merging it right away, as I am not completely sold on search strategies idea. Chaining multiple is not a really flexible approach. For example, it leads to iterating over results directly, while there's no way to apply custom search logic. Also the order in which strategies can be chained is also fixed, what I'd consider a design flaw. There are a decent amount of unrelated changes here, like replacing I'd prefer to hold this off a bit longer, and see how's other changes from this PR will do in the next release. |
This is a very old and abandoned PR, let's put it to rest. |
Improves search performance. Returns results without any observable delay when searching through large docsets (including .NET and QT).
Cancels previous incomplete searches.
Defers browser url loading.
Adds caching of previous searches. Filters through the existing result list to avoid searching through the entire docset.
Adds parallel searching of docsets.
Depends on #459 in order to correctly display ToC after ESC is pressed.