New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First compilation and live reload are too slow #6198
Comments
Hey there @bitforcesrl! 👋 Unfortunately this is a problem that we see come up with projects using webpack and There are a couple of ways we suggest with optimizing this, probably the most notable will be following this guide: https://github.com/carbon-design-system/carbon/blob/master/docs/guides/sass.md#optimizing-your-sass-builds This will help you import only the components that you use to help decrease the total time the project takes to compile. Similarly, splitting out these vendor styles from the styles you are authoring in your project will help out. In projects using webpack, this would be through separate sass imports. Hope this helps! |
Hi @joshblack - importing select components individually only makes sense when few components are used. I did some profiling and unfortunately the live compile times increase drastically even with 1 (!!!) component included. Importing all the components makes live reload so slow to the point of being unusable. I also see some noticeable CPU load during the live compilation. I suspect there is something both common and compute-heavy often being used, something that makes the whole build process highly resource heavy. It could also be related to I will try to see about what that could possibly be, but it would be nice for you guys to do some profiling as well. I would really like to avoid doing dirty hacks like using a separately built carbon. I would not be able to use whatever stuff is exposed by Carbon in that case, and I would rather want to avoid that. |
We are including only what is needed in our project, but the compilations is insanely slow. |
FYI I am using Vue, not Angular. So the problem seems to be cross-framework. |
Sorry for the delay in responding here @Addvilz! Definitely agreed, long sass times are incredibly frustrating and we have experienced them on our end as well since we use the sass for our component development in storybook. As you noted, As a result, we've ended up switching to As we look towards our October major release, we're hoping to drop the mechanisms that tend to cause this slowdown. Under the hood, we use an We're hoping to address this by removing this mechanism, defining an import order, and relying on Sass modules in the future to achieve the same behavior. Until then, this is where guides like the above come into play. Always happy to chat on Slack help debug locally, either through #carbon-react or #carbon-components 👍 |
Hi @joshblack, I wonder if there're any progress on this issue? |
@selimdoyranli I see you've posted similar experiences in different closed issues. Would you be open to drumming up a new issue based on your experience using Carbon so we can track that? thx! |
we are developing application using react js with ibm carbon but looks like the load of the page is too slow . requesting for a solution |
@edumpus01 Feel free to create a new issue following our bug template and we'll be happy to take a look. |
I'm referring to this issue which is closed but the problem is still there and other people are reporting that slowness
#3348
thanks
The text was updated successfully, but these errors were encountered: