Unverified Commit b132f1dc authored by Sam Poder's avatar Sam Poder Committed by GitHub

Consider merging chunks when `overlap == 1` (#95102)

See https://github.com/vercel/next.js/pull/95026/changes#r3462912703; as
discussed in office hours

---------
Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
parent 0776ea2f
......@@ -249,8 +249,8 @@ pub async fn make_production_chunks(
for (i, other) in selection.iter().enumerate() {
iterations += 1;
let overlap = overlap(&candidate.chunk_groups, &other.chunk_groups);
// It need to have at least two chunk groups in common
if overlap <= 1 {
// It need to have at least one chunk group in common
if overlap < 1 {
continue;
}
// If the candidate is already big enough, avoid shrinking the sharing
......
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