From 17731bc0f0a8887a85c60cf39ed2d94822c1274a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 09:32:13 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9A=A1=20Bolt:=20Optimize=20sitemap=20ge?= =?UTF-8?q?neration=20with=20parallel=20data=20fetching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced the sequential `for...of` loop in `app/sitemap.ts` with parallel execution via `Promise.all`. This allows `getSpeakers` and `getTalks` to be fetched simultaneously for each year, greatly reducing overall sitemap build time. Handled error states gracefully for individual items using `.catch(() => [])`. Co-authored-by: anyulled <100741+anyulled@users.noreply.github.com> --- app/sitemap.ts | 85 ++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index b1e4a2f9..ea01ca5a 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -28,56 +28,65 @@ export default async function sitemap(): Promise { }); } - for (const year of years) { - urls.push({ - url: `${baseUrl}/${year}`, - lastModified: new Date(), - changeFrequency: "daily", - priority: 0.9, - }); + const yearUrls = await Promise.all( + years.map(async (year) => { + const urls: MetadataRoute.Sitemap = []; - const yearPages = ["speakers", "talks", "schedule", "job-offers", "cfp", "diversity", "sponsorship", "travel"]; - for (const page of yearPages) { urls.push({ - url: `${baseUrl}/${year}/${page}`, + url: `${baseUrl}/${year}`, lastModified: new Date(), - changeFrequency: "weekly", - priority: 0.8, + changeFrequency: "daily", + priority: 0.9, }); - } - const speakers = await getSpeakers(year); - for (const speaker of speakers) { - urls.push({ - url: `${baseUrl}/${year}/speakers/${speaker.id}`, - lastModified: new Date(), - changeFrequency: "weekly", - priority: 0.7, - }); - } + const yearPages = ["speakers", "talks", "schedule", "job-offers", "cfp", "diversity", "sponsorship", "travel"]; + for (const page of yearPages) { + urls.push({ + url: `${baseUrl}/${year}/${page}`, + lastModified: new Date(), + changeFrequency: "weekly", + priority: 0.8, + }); + } + + const [speakers, sessionGroups] = await Promise.all([ + getSpeakers(year).catch(() => []), + getTalks(year).catch(() => []) + ]); - const sessionGroups = await getTalks(year); - for (const group of sessionGroups) { - for (const talk of group.sessions) { + for (const speaker of speakers) { urls.push({ - url: `${baseUrl}/${year}/talks/${talk.id}`, + url: `${baseUrl}/${year}/speakers/${speaker.id}`, lastModified: new Date(), changeFrequency: "weekly", priority: 0.7, }); } - } - const companies = getJobOffersByYear(year); - for (const company of companies) { - urls.push({ - url: `${baseUrl}/${year}/job-offers/${slugify(company.name)}`, - lastModified: new Date(), - changeFrequency: "monthly", - priority: 0.5, - }); - } - } + for (const group of sessionGroups) { + for (const talk of group.sessions) { + urls.push({ + url: `${baseUrl}/${year}/talks/${talk.id}`, + lastModified: new Date(), + changeFrequency: "weekly", + priority: 0.7, + }); + } + } + + const companies = getJobOffersByYear(year); + for (const company of companies) { + urls.push({ + url: `${baseUrl}/${year}/job-offers/${slugify(company.name)}`, + lastModified: new Date(), + changeFrequency: "monthly", + priority: 0.5, + }); + } + + return urls; + }) + ); - return urls; + return urls.concat(...yearUrls); } From 0ae9e7d8903bfaad9c2c1bc432392cd63f6ab1f8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 09:36:20 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9A=A1=20Bolt:=20Optimize=20sitemap=20ge?= =?UTF-8?q?neration=20with=20parallel=20data=20fetching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced the sequential `for...of` loop in `app/sitemap.ts` with parallel execution via `Promise.all`. This allows `getSpeakers` and `getTalks` to be fetched simultaneously for each year, greatly reducing overall sitemap build time. Handled error states gracefully for individual items using `.catch(() => [])`. Fixed prettier formatting issues. Co-authored-by: anyulled <100741+anyulled@users.noreply.github.com> --- app/sitemap.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index ea01ca5a..fc337949 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -49,10 +49,7 @@ export default async function sitemap(): Promise { }); } - const [speakers, sessionGroups] = await Promise.all([ - getSpeakers(year).catch(() => []), - getTalks(year).catch(() => []) - ]); + const [speakers, sessionGroups] = await Promise.all([getSpeakers(year).catch(() => []), getTalks(year).catch(() => [])]); for (const speaker of speakers) { urls.push({