Skip to content

project: Increase search detect yield threshold to 20KB#47824

Merged
osiewicz merged 1 commit intozed-industries:mainfrom
cppcoffee:project-search
Jan 29, 2026
Merged

project: Increase search detect yield threshold to 20KB#47824
osiewicz merged 1 commit intozed-industries:mainfrom
cppcoffee:project-search

Conversation

@cppcoffee
Copy link
Contributor

Release Notes:

  • Improved CPU switching frequency for project search

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 28, 2026
@cppcoffee
Copy link
Contributor Author

cppcoffee commented Jan 28, 2026

For modern CPU and I/O speeds, the 128-byte threshold is too small. This means the program will extremely frequently pause the current task and yield control back to the scheduler. This excessive Context Switching causes huge CPU overhead, severely slowing down the scanning speed of large batches of files.

Partially solve #47767

Copy link
Member

@osiewicz osiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍 We'll probably merge it tomorrow, as today's a release day. Let's give it some baking time on Nightly.

@osiewicz osiewicz merged commit 2c4a823 into zed-industries:main Jan 29, 2026
29 checks passed
@cppcoffee cppcoffee deleted the project-search branch January 30, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants