Gutenberg on a badly built WordPress website is very slow
I host a site with TONS of blocks and containers using Stackable. When inspecting the final HTML, it looks fucking horrible. It's as long as a US court document.
Every text block has like a 1 KM long stack of classes for everything lol.
It's not built with lightness in mind, both by the plugin as well as by me as a user of the block builder.
I might redo it but I don't feel like it.
My issue is: Gutenberg lags like fucking hell. It's extreeeemely annoying.
It lags like a bit ALL of the time, and sometimes freezes, goes for any web browser.
I've got a 16 GB RAM MacBook Pro M2 so it's a really beefy computer, and looking at my activity monitor, when It's lagging, it's usually in high usage (CPU & Memory), but usually not even close to peaking. Safari is lighter on it, but I feel like it's because it's caching less (if I tab to another website and tab back to the Gutenberg editor it's hell).
Apart from rebuilding the whole thing and doing it right, do you have any suggestion for me?
COULD there be anyway that the server is to blame? I host it all on a very small server with a weak CPU, and I noticed that autosaving was the real theif, it was just not workable, it saved every 60 seconds, and while saving, no work could be done for like 20 seconds.
However, still, after turning it off, it's not snappy at all, and often attacks me with lag spikes.
I basically just want any tips I could get apart form rebuilding it, which probably is the best tip.
Also, the server's usage is very high (not a lot of wiggle room), but if that can't have to do with the lagging inside of Gutenberg I don't care honestly.
When autosaving was enabled, it lags enough to make Chrome think the side has stopped responding, when it's disabled, it lags a lot still but not that much. No warnings anymore.
Why it might not be the computer: As said, the usage on my Macbook normally isn't at peak levels on either CPU or RAM when it lags, and if I tab to another tab with like a 4K YouTube video or something, it dosen't lag at all, even with the lagging Gutenberg in the background.
Why it might be the computer: I have a M1 (instead of this M2) that's an Air (instead of this Pro) that has 8 GB RAM (instead of this 16 GB RAM) and it lags MUCH more.