Compare commits

...

9 Commits

Author SHA1 Message Date
Malte Ubl
35c6b19af7 Don't chunk-group prerender functions 2023-12-11 13:35:40 -08:00
Malte Ubl
4a3023e100 log2 2023-12-09 15:44:46 -08:00
Malte Ubl
03d8071c73 log 2023-12-09 15:23:22 -08:00
Malte Ubl
3a70a60064 log 2023-12-09 14:57:58 -08:00
Malte Ubl
178ba78028 Ignore prefix 2023-12-09 14:55:42 -08:00
Malte Ubl
5fd2674247 Log chunks 2023-12-09 11:46:38 -08:00
Malte Ubl
02ac64686b Log chunks 2023-12-09 11:20:45 -08:00
Malte Ubl
ed277ae07a Group by chunks 2023-12-09 11:19:00 -08:00
Malte Ubl
e06501d06f Just logging 2023-12-09 11:00:03 -08:00

View File

@@ -1484,6 +1484,7 @@ export type LambdaGroup = {
pseudoLayer: PseudoLayer;
pseudoLayerBytes: number;
pseudoLayerUncompressedBytes: number;
chunks: string;
};
export async function getPageLambdaGroups({
@@ -1528,6 +1529,11 @@ export async function getPageLambdaGroups({
const groups: Array<LambdaGroup> = [];
for (const page of pages) {
const chunks = Object.keys(pageTraces[page])
.filter(filename => filename.includes('.next/server/chunks/'))
.sort()
.join(',');
console.log('Page', page, chunks.length);
const newPages = [...internalPages, page];
const routeName = normalizePage(page.replace(/\.js$/, ''));
const isPrerenderRoute = prerenderRoutes.has(routeName);
@@ -1568,7 +1574,8 @@ export async function getPageLambdaGroups({
group.maxDuration === opts.maxDuration &&
group.memory === opts.memory &&
group.isPrerenders === isPrerenderRoute &&
group.isExperimentalPPR === isExperimentalPPR;
group.isExperimentalPPR === isExperimentalPPR &&
(group.isPrerenders || group.chunks === chunks);
if (matches) {
let newTracedFilesSize = group.pseudoLayerBytes;
@@ -1612,7 +1619,9 @@ export async function getPageLambdaGroups({
pseudoLayerBytes: initialPseudoLayer.pseudoLayerBytes,
pseudoLayerUncompressedBytes: initialPseudoLayerUncompressed,
pseudoLayer: Object.assign({}, initialPseudoLayer.pseudoLayer),
chunks,
};
console.log('Created new lambda group for page', page, chunks.length);
groups.push(newGroup);
matchingGroup = newGroup;
}