Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
fe45b74f
Unverified
Commit
fe45b74f
authored
Feb 11, 2025
by
Tobias Koppers
Committed by
GitHub
Feb 11, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Turbopack] add fast path for increase active count (#75900)
### What? avoid the extra work when increasing active count
parent
be0a2550
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
aggregation_update.rs
...tasks-backend/src/backend/operation/aggregation_update.rs
+13
-3
No files found.
turbopack/crates/turbo-tasks-backend/src/backend/operation/aggregation_update.rs
View file @
fe45b74f
...
@@ -1187,7 +1187,16 @@ impl AggregationUpdateQueue {
...
@@ -1187,7 +1187,16 @@ impl AggregationUpdateQueue {
name
=
ctx
.get_task_description
(
task_id
)
name
=
ctx
.get_task_description
(
task_id
)
)
)
.entered
();
.entered
();
let
mut
task
=
ctx
.task
(
task_id
,
TaskDataCategory
::
Meta
);
let
task
=
ctx
.task
(
task_id
,
TaskDataCategory
::
Meta
);
self
.find_and_schedule_dirty_internal
(
task_id
,
task
,
ctx
);
}
fn
find_and_schedule_dirty_internal
(
&
mut
self
,
task_id
:
TaskId
,
mut
task
:
impl
TaskGuard
,
ctx
:
&
mut
impl
ExecuteContext
<
'_
>
,
)
{
let
session_id
=
ctx
.session_id
();
let
session_id
=
ctx
.session_id
();
// Task need to be scheduled if it's dirty or doesn't have output
// Task need to be scheduled if it's dirty or doesn't have output
let
dirty
=
get!
(
task
,
Dirty
)
.map_or
(
false
,
|
d
|
d
.get
(
session_id
));
let
dirty
=
get!
(
task
,
Dirty
)
.map_or
(
false
,
|
d
|
d
.get
(
session_id
));
...
@@ -1967,13 +1976,14 @@ impl AggregationUpdateQueue {
...
@@ -1967,13 +1976,14 @@ impl AggregationUpdateQueue {
}
}
if
is_positive_now
{
if
is_positive_now
{
let
followers
=
get_followers
(
&
task
);
let
followers
=
get_followers
(
&
task
);
drop
(
task
);
// Fast path to schedule
self
.find_and_schedule_dirty_internal
(
task_id
,
task
,
ctx
);
if
!
followers
.is_empty
()
{
if
!
followers
.is_empty
()
{
self
.push
(
AggregationUpdateJob
::
IncreaseActiveCounts
{
self
.push
(
AggregationUpdateJob
::
IncreaseActiveCounts
{
task_ids
:
followers
,
task_ids
:
followers
,
});
});
}
}
self
.push_find_and_schedule_dirty
(
task_id
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment