HI,
we have noticed that pages that are coming to form builder.io are loading much longer than if we put static HTML. Also, the page seams to re-render on the client side.
Here is the Link to the Page: R Big Bags Abholung / Entsorgung beauftragen – Berlin Recycling Shop
This is the spped index result: https://pagespeed.web.dev/analysis/https-shop-berlin-recycling-de-pages-big-bags-abholung-entsorgung-beauftragen/e4pq1ffczt?form_factor=desktop
Builder content link
Builder.io: Visual Development Platform
Builder public api key
da92e0c53398459689b527346fc360a5
What are you trying to accomplish
The Page is re-rendering on the clientside causing a page speed increase.
Code stack you are integrating Builder with
NextJS
Reproducible code example
import { builder } from '@builder.io/sdk';
import { notFound } from 'next/navigation';
import { builderInit } from '@/lib/builder-io/builder-init';
import { RenderBuilderContent } from '@/lib/builder-io/render-builder-content';
// Initialize Builder.io
builderInit();
interface PageProps {
params: {
path?: string[];
};
}
export default async function Page({ params }: PageProps) {
if (!params?.path?.length) return notFound();
const urlPath = `/pages/${params.path.join('/')}`;
try {
const builderPage = await builder
.get('page', {
options: { includeRefs: true, noTraverse: false },
userAttributes: { urlPath },
prerender: false,
cachebust: false,
cache: true
})
.toPromise();
if (builderPage) {
return <RenderBuilderContent model="page" content={builderPage} />;
}
return notFound();
} catch (error) {
console.error('Error fetching Builder.io content:', error);
return notFound();
}
}
We also wrap our content in a custom component called global-container. Maybe the custom component is the problem…