linksplatform / linksplatform/doublets-rs
Use buffered iterators to speed up the search
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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