Unverified Commit 143769bc authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: Redefine Background backend jobs (#83174)

### What?

We don't need background jobs that run when idle. We already have a `idle_start` event for that.
Instead we need "background jobs" that do not count towards activeness of the system (do not contribute to the compile duration and these effects).

Also remove a bunch of unused stuff from the manager.
parent 444da2b5
...@@ -2230,7 +2230,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> { ...@@ -2230,7 +2230,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
let chunk_size = good_chunk_size(data.len()); let chunk_size = good_chunk_size(data.len());
let chunks = data.len().div_ceil(chunk_size); let chunks = data.len().div_ceil(chunk_size);
for i in 0..chunks { for i in 0..chunks {
turbo_tasks.schedule_backend_foreground_job( turbo_tasks.schedule_backend_background_job(
TurboTasksBackendJob::Prefetch { TurboTasksBackendJob::Prefetch {
data: data.clone(), data: data.clone(),
range: Some( range: Some(
......
...@@ -265,7 +265,7 @@ where ...@@ -265,7 +265,7 @@ where
fn schedule_task(&self, mut task: impl TaskGuard + '_) { fn schedule_task(&self, mut task: impl TaskGuard + '_) {
if let Some(tasks_to_prefetch) = task.prefetch() { if let Some(tasks_to_prefetch) = task.prefetch() {
self.turbo_tasks self.turbo_tasks
.schedule_backend_foreground_job(TurboTasksBackendJob::Prefetch { .schedule_backend_background_job(TurboTasksBackendJob::Prefetch {
data: Arc::new(tasks_to_prefetch), data: Arc::new(tasks_to_prefetch),
range: None, range: None,
}); });
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#![feature(ptr_metadata)] #![feature(ptr_metadata)]
#![feature(sync_unsafe_cell)] #![feature(sync_unsafe_cell)]
#![feature(vec_into_raw_parts)] #![feature(vec_into_raw_parts)]
#![feature(async_fn_traits)]
pub mod backend; pub mod backend;
mod capture_future; mod capture_future;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment