So because of this, I changed in one of the micro frontend, when we compiled that micro frontend, it was taking around 60 to 70 seconds. Imagine a compile on a micro frontend taking around 60 to 70 seconds. So what did we do? We restricted that the first one, type explosion, we restricted our type. So that, say, for example, for typography, the use case what I explained for typography, we don't need all possible HTML tags to be included over here. Because in general typography, it could be div, span, paragraph, section, main, or whatever possible tags that could help us for formatting the text. But we don't want image tag, SVG tag, and all these things. So we made this type to be much restrictive.
And barrel files. Yeah, this is something which we are doing it now. There are a lot of barrel files in our monadopo, which we are trying to kill a lot one by one by one. We are still with it. But both together did help us to reduce the compile time. For one MFV, before, it took around 60 to 70 seconds. But now it just takes 30 to 30 seconds. So as an overall, for a commit in the PR, the CI, the compilation part, which was taking around 35 minutes, now got reduced to 10 to 15 minutes. See a great improvement what we have. So this actually helped us in reducing our compile time by over 60%.
So these three things did help us to improve our CSV a lot. But do we have any more things which could help us over here? Yes, we identified three smaller things which could help over here. One is pnpm. Yes, we were using npm and then YARN classic. But the dependency management was poor in that. So then we moved towards pnpm. And you know with pnpm, the dependency management is much faster, simpler, and easy to break and all those things. So we migrated towards pnpm. And the next concern what we had is some of the things whatever we have in our CI is totally waste. Say for example, translations. So as I told you the scenario what we had to deploy 10 plus micro frontends. The translations are already bundled into our CI. And the transition was running like one minute per micro frontend.
Comments