Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
On demand indexing #1260
On demand indexing #1260
Changes from 8 commits
2ff5acf
a9882c5
7dd5582
fffe202
75d30f2
6c20c94
92c7e62
055a922
8934fad
0af544f
9a478cc
03579f9
9c73c66
1a59fd8
afecb31
056aa61
5ba84b8
ff720ce
de7f47a
99ac925
b9c83d2
fc9c456
cec3040
d136370
a003d31
dc94b07
41ca00b
413b5dd
5416d7a
d98eb18
d59306d
8d34dfa
3971114
bbcb689
f054f92
8a91a23
161dc2c
c505eff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is it necessary to store the Text if the POIs are not (yet) stored? if Text is still stored it could be used to grep in the in-memory binary. If it's not stored it can spare some memory.
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.
Ideally, it would be good to perform the in-memory grep, but it may require some time before we get there. We should check how the
Text
is used and where. There's quite some complex logic around the apply-edit and the index buffer which we may want to simplify...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.
Switched to an in-memory search (that can definitely be optimized) instead of the grep.
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.
do I understand correctly that every time I look up references of an entity, it will call
find_by
and try to insert a lot of references in the ref_db (ets entries might be there already, so some of them might be noop) Why do we store the references in ets then? can't we run the matching on thePOIs
list in place?Alternatively can we mark Uris, which already registered their references, so we can skip lookup_pois+register_references for them?
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.
In my latest version (soon to be pushed), we only do this when expanding the POIs and enforcing a full indexing.
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.
My major concern here is that, depending on the pattern, we may end up indexing a lot of files. Need to find a good strategy to reduce the number of candidates significantly.