-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Transient tasks #8764
base: main
Are you sure you want to change the base?
Transient tasks #8764
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
8f0000c
to
d13a797
Compare
5e4b8d7
to
3488490
Compare
|
d13a797
to
f2892be
Compare
3488490
to
8b2e404
Compare
8b2e404
to
79ae4b8
Compare
6a2b023
to
4c95906
Compare
79ae4b8
to
84301f5
Compare
4c95906
to
47efbda
Compare
84301f5
to
d43625e
Compare
647470f
to
a97d97a
Compare
f0f3d2a
to
6fdd5a5
Compare
6fdd5a5
to
01eecb3
Compare
01eecb3
to
e3616fc
Compare
e3616fc
to
e3e5fc7
Compare
@@ -77,6 +77,14 @@ impl Debug for TaskId { | |||
} | |||
} | |||
|
|||
pub const TRANSIENT_TASK_BIT: u32 = 0x8000_0000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could go for 0xc000_0000
if we need more space for persistent tasks. That would work with the system, but I keep it in the middle for now
Rename PersistentTaskType -> CachedTaskType
e3e5fc7
to
5422e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love that this duplicates a lot of functions and logic, but I'm okay with it, and there's probably not much more that can be done for that.
@@ -292,6 +319,74 @@ impl MemoryBackend { | |||
pub fn task_statistics(&self) -> &TaskStatisticsApi { | |||
&self.task_statistics | |||
} | |||
|
|||
fn track_cache_hit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving my garbage out into a separate function!
Description
Track which tasks are transient and which are persistent. We need to track that for persistent caching.
We used a different task id space for transient tasks so they don't use up persistent ids and to easily identify transient tasks.
Testing Instructions