Skip to content

Commit

Permalink
Add caching to chunk_content's graph walking (vercel/turborepo#6242)
Browse files Browse the repository at this point in the history
### Description

Extracts `chunk_content`'s processing of module references -> graph
nodes into a turbo function, allowing us to cache the result of
processing of every module.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->


Closes WEB-1817

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
  • Loading branch information
jridgewell and sokra authored Oct 21, 2023
1 parent 3a76d53 commit 3cc0e8c
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 139 deletions.
2 changes: 1 addition & 1 deletion crates/turbopack-core/src/chunk/chunk_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub async fn make_chunk_group(
forward_edges_inherit_async,
local_back_edges_inherit_async,
available_async_modules_back_edges_inherit_async,
} = chunk_content(chunking_context, entries, Value::new(availability_info)).await?;
} = chunk_content(chunking_context, entries, availability_info).await?;

// Find all local chunk items that are self async
let self_async_children = chunk_items
Expand Down
Loading

0 comments on commit 3cc0e8c

Please sign in to comment.