Hello Devs,
I am using Bricksforge only to have ProForms on the website I have. Loading the bricksforge_elements.js with its 187KB size feels a bit overkill for only that functionality.
Do you plan to modularize the JS into smaller modules so that we don’t have to waste loading time and computing if only a small portion of the script is used?
On the front page it is advertised that Bricksforge has:
Modular Approach
Only the features you activate for your project are loaded. This gives you the best possible performance.
It would be perfect if you could chop the big JS into smaller modules.
Thank you!
Hi Andris,
At the moment, we’re not planning to split bricksforge_elements.js into many smaller frontend modules.
The current modular approach already follows what we consider the most efficient balance in a real-world WordPress environment. Most Bricksforge users don’t use just one feature — they typically combine multiple features at once. In those cases, aggressively splitting everything into many tiny JS files would actually become less efficient overall due to additional requests, dependency handling, execution overhead, and caching behavior.
That’s also the reason why Bricks itself ships a larger bricks.min.js bundle containing most functionality. While it may seem counterintuitive at first, a single optimized and cached file is often more performant than many smaller fragmented files — especially once multiple features are involved.
Going even more granular than the current structure would likely reduce efficiency for the majority of users rather than improve it.
Kind regards
Daniele
Hello Daniele,
Thank you for the explanation! I understand your view now.
András
1 Like