feat!: Revamp & optimize the way paths are stored#387
Merged
dmtrKovalenko merged 9 commits intomainfrom Apr 18, 2026
Merged
Conversation
This is a very crucial redesign that actually required a lot of consideration to move forward but now it allows us to save a lot of RAM, acutally improves query time and gives an ability to query directories for free
de1b36e to
bf557ce
Compare
dmtrKovalenko
commented
Apr 18, 2026
| sort_and_paginate(results, context) | ||
| let t3 = std::time::Instant::now(); | ||
|
|
||
| let result = sort_and_paginate(results, context); |
Owner
Author
There was a problem hiding this comment.
sort and pagiante should happen in the level above AFTER both arenas are processed
|
|
||
| let result = sort_and_paginate(results, context); | ||
|
|
||
| let t4 = std::time::Instant::now(); |
Owner
Author
There was a problem hiding this comment.
remove all of those and the logging below
| base_score / 5 * 2 // 40% bonus for exact filename match | ||
| base_score / 5 * 2 | ||
| } else if is_filename_match { | ||
| // 16% bonus for fuzzy filename match that landed in the filename region. |
Owner
Author
There was a problem hiding this comment.
restore the comments from this function
| out.clear(); | ||
|
|
||
| let dir_len = self.filename_offset as usize; | ||
| if dir_len == 0 { |
Owner
Author
There was a problem hiding this comment.
remve this check is uselses
| let fname_offset = self.filename_offset as usize; | ||
| let total = self.byte_len as usize; | ||
| let fname_len = total - fname_offset; | ||
| if fname_len == 0 { |
| } | ||
| } | ||
|
|
||
| pub(crate) fn build_chunked_path_store_from_strings( |
Owner
Author
There was a problem hiding this comment.
mark as used by tests
| /// Tombstone — file was deleted but index slot is preserved so | ||
| /// bigram indices for other files stay valid. | ||
| pub const DELETED: u8 = 1 << 1; | ||
| /// File was added after the last full reindex; its ChunkedString |
Owner
Author
There was a problem hiding this comment.
remove the metnion of chunked sting here
| git_status: self.git_status, | ||
| flags: self.flags, | ||
| // Don't clone the content — the clone lazily re-creates it on demand | ||
| // on clone we have to reset the cointent lock |
| /// 2. Full results — fff collect-all vs rg full line output (N iterations) | ||
| /// 3. First-page — fff paginated (50 results) vs rg telescope-style | ||
| /// (spawn, stream 50 lines, kill) — the real UI scenario (N iterations) | ||
| /// 1. Raw engine speed --- fff count-only vs rg --count-matches (N iterations) |
a82e6ec to
b1377d8
Compare
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.
closes #285
This is a very crucial redesign that actually required a lot of
consideration to move forward but now it allows us to save a lot of RAM,
acutally improves query time and gives an ability to query directories
for free