linksplatform / linksplatform/doublets-rs

Use buffered iterators to speed up the search

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bench:New Issue:Easy Store:Search
Dominant language
Rust
Stars
6
Forks
0
Avg merge
1h 37m
Merged PRs (30d)
1

Description

Currently, `op_iter` functions use `Vec` to collect `op` results to `vec` and returns `vec.into_iter()`.
I recommend use buffered lock-free iterator generator crate - [`buter`](https://crates.io/crates/buter) or similar

For example, it will look like this:
```rust
//! before
let mut vec = Vec::with_capacity(...);
self.each(..., |link| {
vec.push(link);
Continue
});
vec.into_iter()

//! after
let writer = self.buter.writer();
self.each(..., |link| {
writer.extend(Some(link));
Continue
});
writer.into_iter()
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the `op_iter` functions and inspect how they collect `op` results into a `Vec` before returning `into_iter()`. Compare the proposed `buter` or similar buffered iterator approach across the affected search paths; done means the relevant iterators no longer use the current collection pattern and the search is measurably faster.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance, search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.