Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Find a file
Thorsten Ball 0a78c67647 Improve performance of select-all-matches
This fixes #6440.

The previous approach was calling select-next-match in a loop, which
leaves optimizations on the table when you already know that you want to
select all of the matches.

So what we did here is to optimize the code for the "give me all
matches" case:

1. Find all results in the current buffer
2. Build up *all* selections
3. Sort selections & throw away overlapping ones (keep oldest)
4. Unfold if necessary
5. Render selections

On my M3 Max searching for `<span` in the test file [1] from the ticket,
it

previously took: ~1.07s
now takes: ~4ms

[1]: https://github.com/standardebooks/edgar-allan-poe_poetry/blob/master/src/epub/text/poetry.xhtml

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-25 13:35:22 +01:00
.cargo Remove 2 suffix from gpui_macros, fix compile errors in tests 2024-01-03 13:12:21 -08:00
.config tests: Test 'db' package sequentially (#2654) 2023-06-28 15:00:43 +02:00
.github Update all links point to community 2024-01-24 15:11:17 -05:00
.zed Use auto formatter settings for Zed repo. 2024-01-12 12:00:18 +02:00
assets Remove unused font 2024-01-24 13:14:47 +01:00
crates Improve performance of select-all-matches 2024-01-25 13:35:22 +01:00
docs Remove references to community repo 2024-01-25 00:30:26 -05:00
plugins Use the same serde version across the entire workspace 2023-03-28 09:42:00 -07:00
script Fix typos 2024-01-24 14:58:47 -05:00
.dockerignore Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit 2023-01-27 15:43:12 -08:00
.gitignore Add top-ranking issues script 2024-01-24 14:40:55 -05:00
.gitmodules WIP: start on live_kit_server 2022-10-17 09:59:16 +02:00
.mailmap Add Conrad and Thorsten to .mailmap file 2024-01-25 09:56:14 +01:00
Cargo.lock Update cocoa to crates.io version (#6452) 2024-01-25 10:04:29 +02:00
Cargo.toml Update cocoa to crates.io version (#6452) 2024-01-25 10:04:29 +02:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md (#4239) 2024-01-23 22:31:39 -05:00
CONTRIBUTING.md Update all links point to community 2024-01-24 15:11:17 -05:00
debug.plist WIP 2023-12-14 09:25:14 -07:00
docker-compose.sql Add config files for running Postgres inside Docker Compose (#3637) 2023-12-13 17:25:07 -05:00
docker-compose.yml Add config files for running Postgres inside Docker Compose (#3637) 2023-12-13 17:25:07 -05:00
Dockerfile Bump Rust to 1.75 (#3815) 2023-12-28 19:22:43 +01:00
LICENSE-AGPL chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-APACHE chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
Procfile Update procfile and local development docs, zed.dev is no longer needed 2024-01-17 13:28:58 -08:00
README.md Balance headings in README (#4238) 2024-01-23 22:15:37 -05:00
rust-toolchain.toml Remove redundant install Rust steps 2024-01-11 14:11:13 +02:00
typos.toml Move file finder tests to their own file 2024-01-23 15:39:51 -08:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.