Sélectionner une page

Speeding Up Divi From Every Angle

Speeding Up Divi From Every Angle

Divi Eliminates Bloat

The new version of Divi eliminates bloat and gives you the best of both worlds: the power of an expansive page builder with the nimbleness of a lightweight theme.

Dynamic PHP Framework

Divi’s new Dynamic Framework only processes the logic needed to render the modules and features that you use on each page. Everything else is cut out of the equation. If your page only uses 5 of Divi’s 50+ modules, Divi only processes the functions needed for those 5 modules and it skips the rest. If those 5 modules don’t use some of Divi’s many features like Scroll Effects, Animations, Sticky Options, Border Options, etc, then it doesn’t process those functions either. Simple as that. Divi is now much leaner than it has ever been because it’s stripping away everything you aren’t using on the fly. In other words, anything that could be considered “bloat” is erased from the back-end.

Dynamic CSS

We applied that same anti-bloat logic to Divi’s stylesheet. We took Divi’s big CSS file and broke it up into hundreds of small components. On each page, these CSS components are combined to form a unique stylesheet that contains only the pieces needed to style that particular page based on the modules, module features and theme layout options that you are using. The result is a dramatic decrease in the CSS file size on each page you build with Divi. There is no bloat, because unused CSS is never loaded. In our test website from earlier, Divi’s CSS size was reduced from 860kb all the way down to a mere 54kb.

Smart Styles

Divi’s builder-generated CSS has also been optimized to reduce duplicate styles and overall file size. Now, Divi identifies duplicate styles and combines selectors into a single list. Using Divi Presets, you can create very lightweight pages because each module using a preset doesn’t need to have its own unique block of styles, but instead can share its styles within other users of the preset.

JavaScript Optimization

We modularized a huge portion of Divi’s JavaScript file, allowing Divi to load each JavaScript library on-demand only when it’s needed by the specific modules you are using on a page. We also broke out some of Divi’s features, such as Sticky Options and Motion Effects, loading those pieces only when necessary. On top of that, we were able to remove big chunks of unneeded code and, in the end, cut Divi’s base JavaScript file size in half.

Source link