Issue #2203💬 AnsweredOpened August 19, 2019by benvmatheson1 reactions

Possible configuration bloat

Quick answerby devgru1

Consider using avoidDefaults flag, it reduces config footprint by removing these default values: https://github.com/artf/grapesjs/blob/c1fb490a73adefb0fa073f37bef4e6178d9321a8/src/editor/config/config.js#L131

Read full answer below ↓

Question

We had an issue with Grapes metadata (Components, Style, etc.) growing to the point it was causing issues on our end. After inspecting we noticed that the HTML/CSS grapes was outputting was less than 5k, but the Components/Style objects were storing at ~190k.

After looking into the components, I noticed most of the data is keys with empty/default values ("", [], 0, etc.). Would it be worth leaving these values out to save space, and changing the logic within grapes to assume undefined attributes represent empty/default values?

Answers (2)

artfAugust 26, 2019

Consider using avoidDefaults flag, it reduces config footprint by removing these default values

Correct

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.