---
title: "Nerd-sniped: Project Search"
description: "Zed's project search had throughput close to ripgrep's, but the first result arrived very late."
url: "https://swe.quest/articles/nerd-sniped-project-search-17d9940efc6867bf"
canonical: "https://zed.dev/blog/nerd-sniped-project-search"
source: "Zed"
published: "2025-11-26"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["performance","concurrency","search","rust","developer-tools"]
---

# Nerd-sniped: Project Search

A post on [Zed](https://swe.quest/sources/zed.md), published 2025-11-26, 9 min read, Case study. Original: [https://zed.dev/blog/nerd-sniped-project-search](https://zed.dev/blog/nerd-sniped-project-search)

## Summary

Zed's project search had throughput close to ripgrep's, but the first result arrived very late. The cause was task starvation: the few tasks that confirmed matches in known-matching files were queued with the same priority as the flood of candidate-file scans, so they rarely got scheduled until nearly everything else had run. Restructuring the per-thread search loop with Rust's \`select\_biased!\` to prioritize full-match scans over new file scans cut time-to-first-match from 3.8s to 1.1s on the Linux repo and from 16.8s to 32ms on the Rust compiler repo, while slightly improving total throughput. Remaining work includes streaming match paths for remote projects, keeping the UI responsive under very many matches, and closing the remaining throughput gap with ripgrep.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Rust async/await ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))
- channels and task executors
- regex-based text search ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))

## Keywords

Zed, ripgrep, select\_biased!, GPUI, project\_benchmarks

## Related posts

- [Enabling the parallel frontend on nightly](https://swe.quest/articles/enabling-the-parallel-frontend-on-nightly-9c56c94985e87b86.md): Rust Blog · 2026-11-16 · Medium · 6 min read · Rust, Compilers, Performance engineering, Concurrency
  Rust nightly now runs the compiler frontend (type checking, borrow checking) in parallel by default since nightly-2026-11-14, to surface bugs ahead of stabilization.
- [This Week at Zed Industries: #1](https://swe.quest/articles/this-week-at-zed-industries-1-0d07c1f998ae465c.md): Zed · 2023-01-23 · Medium · 4 min read · Developer tools, Performance engineering, Data structures, Rust
  Zed grew out of Xray, the experimental editor Nathan Sobo and Antonio worked on at GitHub in 2018, and this weekly update recaps the path from there to a company and a private alpha.
- [Eliminating Data Races in Firefox – A Technical Report](https://swe.quest/articles/eliminating-data-races-in-firefox-a-technical-report-5763b33d1a4f6f94.md): Mozilla Hacks · 2021-04-06 · Hard · 11 min read · Concurrency, C & C++, Rust, Debugging, Static analysis
  Mozilla deployed ThreadSanitizer across Firefox's C/C++ and Rust code, using a compiled-in suppression list to gate new races in CI while legacy ones were triaged toward a "no data races" policy.
- [Fast regex search: indexing text for agent tools · Cursor](https://swe.quest/articles/fast-regex-search-indexing-text-for-agent-tools-cursor-45908cf7bb0688f8.md): Cursor · 2026-03-23 · Medium · 20 min read · Search, Data structures, Algorithms, AI agents, Developer tools
  Agents lean heavily on regex search, and ripgrep's full scan can take over 15 seconds in large monorepos, so Cursor builds local indexes specifically to accelerate regex queries.
- [We Have to Start Over: From Atom to Zed](https://swe.quest/articles/we-have-to-start-over-from-atom-to-zed-8db3be76f03d8a79.md): Zed · 2024-02-12 · Easy · 25 min read · Rust, Developer tools, Performance engineering, Data structures
  Zed's co-founders explain why they abandoned Atom's Electron/JavaScript stack and rebuilt a code editor in Rust: JavaScript's pointer-chasing arrays, uncontrollable GC pauses, and the costly JS/C++ boundary for multithreading made performance work feel like fighting the platform.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
