Builder widget is blocking the main thread

I have finished the migration of my Angular pages to Builder but when I run lighthouse or page speed, the TBT drops compared to my previous application, the builder widget script is blocking the main thread (attached image).

I used party town to lazy all the other 3P scripts but how can I manage this for the builder script?

FYI, Builder was integrated following the official documentation, on every page, I call the builder component with the corresponding model and I do not use SSR (my app is SPA)

Any idea?
Best regards

Hi @Zak,

Welcome to forum.

It’s not possible to remove those builder scripts from the main thread, however, if there are pages that don’t need builder widgets, it is possible to lazy load them only when they are used in content to improve performance.

Alternatively, you can use our react-lite SDK to pick and choose which components you want to use to improve bundle size even more.

Let us know if you have any further questions. Thank you!

Yes, that was my thought too about builder with the main thread, I am aware that it cannot be removed.
I am already using lazy loading with Angular for the other pages but the home page is built with 100% Builder and unfortunately, it cannot be lazy loaded.

In the post that you send me, I saw a recommendation to use the API instead of the builder component. I will give it a try

Hi Zak,

Please do and in case you still have any issues then you can submit a feature request here Ideas. Thank you!

Hey @Zak - if you want 0 blocking time you can use our Qwik API

1 Like

Thanks, I will give it a try!