Implementing Fundamental Indexing#1483
Merged
austincondiff merged 18 commits intoCodeEditApp:mainfrom Dec 4, 2023
Merged
Conversation
Member
Author
|
@austincondiff Search on M1 MacBook Air is as quick as on my M1 Max. All good now! |
6 tasks
thecoolwinter
previously requested changes
Nov 29, 2023
Co-authored-by: Khan Winter <35942988+thecoolwinter@users.noreply.github.com>
0xWDG
requested changes
Dec 4, 2023
austincondiff
approved these changes
Dec 4, 2023
Collaborator
austincondiff
left a comment
There was a problem hiding this comment.
Looks good! Very nice work @activcoding! 👏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
This PR introduces indexing, enhancing CE's search capabilities by indexing files and enabling efficient keyword searches.
TL;DR: Significant search time reduction from
5 secto0.09 sec(with usage preview) and0.007 sec(without preview). Indexing process completes in just0.1 sec. Tested on CE 16.10.23Description
I've hooked up Search Kit to supercharge CodeEdit's search game. What's that mean for you? Well, we're talking about a behind-the-scenes indexing party. When you throw a search query, CodeEdit now uses this index it built earlier, slashing search times.
For instance, finding 'struct' used to take a sluggish 5 seconds in our 29,000 lines of code. Now? Blink, and you'll miss it—0.09 seconds, even with a usage preview, this not only locates the file but also identifies usages within the found files.! Skip the usage preview, and it's a blink-and-you'll-really-miss-it 0.007 seconds. And guess what? The startup indexing takes just 0.1 seconds.
How It Works
Curious about the magic under the hood? Here's the simplified rundown:
SearchKit diligently maps every term to a document using inverted indexing, creating a handy map of where each term appears. When you search, CodeEdit skips sifting through files directly. Instead, it goes straight to the index, like a well-organised library catalog. Your searches are now lightning-fast. CodeEdit doesn't need to scan every file; it already knows where to find what you're looking for. For more info check out: SearchKit Documentation
and Documentation Archive
FYI: I'll throw in some tests in another PR after this one gets the green light.
Related Issues
Checklist
Screenshots