Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fine-grained scheduling priority #462

Merged
merged 15 commits into from
Dec 29, 2023
Merged

feat: fine-grained scheduling priority #462

merged 15 commits into from
Dec 29, 2023

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Dec 28, 2023

This PR introduces finer-grained scheduling priorities for the Yazi task system, supplementing and enhancing the existing micro and macro tasks.

Previously, Yazi categorized tasks requiring quick responsiveness as micro tasks; and larger, heavier tasks capable of running in the background as macro tasks. However, they had to queue for execution, leading to head-of-line blocking when significant sudden requests occurred.

Now, 3 priority levels (low, normal, high) have been introduced, for both micro and macro tasks. This finer granularity in task handling, and the introduction of new concurrency, allow high-priority tasks to preempt more resources. This will make Yazi more responsive.

The more important thing is that it also covers the Yazi plugin system, which will allow users to allocate different priority levels on demand for their preloader, previewer, and functional plugins.

@sxyazi sxyazi merged commit 32aa190 into main Dec 29, 2023
3 checks passed
@sxyazi sxyazi deleted the pr-fff47cf0 branch December 29, 2023 14:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant