Hi, it is possible somehow optimize `Dashboard` im...
# gooddata-ui
j
Hi, it is possible somehow optimize
Dashboard
import from the
@gooddata/sdk-ui-dashboard
so it has not over 7mb after minify/bundle? It cause us a lot of trouble recently bundling the app.
We use it like
_import_ { Dashboard } _from_ '@gooddata/sdk-ui-dashboard';
The dashboard is lazily loaded so it do not effect our main bundle but still this single dashboard is bigger than our whole application. 🙂
j
Hi Jakub, I will notify our engineers about your question. Can you please meanwhile confirm what SDK version are you using?
j
Thank you. We are currently on the
9.0.1
.
s
Are you building your app with webpack or vite? We are facing the same issue and, in the end, we chose to lazily load the Dashboard component. It doesn't decrease the size of what is bundled but it moves out the Dashboard component dependencies from the main bundle to a separate bundle, the latter being only loaded when necessary. Furthermore, when upgrading your application, the "gooddata" bundle should not be invalidated, meaning it can stay in the browser cache longer.
j
Hi, we use webpack and we lazy load the component, so it is in separate bundle as well.
But still we have some Out of memory issue during building preview on the Vercel. Not in the production build on the Github. I am not even sure it is because of GoodData component, but it looks like that.. it started when we add this dashboard to the app. Previously we used "web-component" but we needed a little bit more control so we switched to the react component.
Our app is quite large (or I thought it was), but this single dashboard is even bigger 🙂 we use it only in "readOnly" mode.
r
Hi all, Radek here 🙂 I'll check this with the devs and let you know if there's a better way around this!
👀 1
Okay, got all the information together - essentially, the Dashboard component is probably the largest one we have, and any changes to its size are unlikely to come soon - sorry I couldn't bring happier news! 😅
j
Thank you for information. We will have to deal with it.