Between forms, leadflows, etc each of these JavaScript's come in at roughly 500 KB uncompressed. If you're using lots of HubSpot's "features" you can wind up with roughly 2.5 megabytes being served for a simple marketing web page. And you can actually go beyond that. That's actually kind of impressive - that it's so bad. Let me say that again: 2.5 megabyte in scripts w/ 500 KB PER script. What in the actual **bleep** are you guys doing. Who QA'd this and went "looks good let's go live". How much offshored development do you guys have? Because that's the only way I can fathom a multi million dollar company being this wildly incompetent with production bundles. And no, they do not NEED to be this size for "compatability, i18n, embedding" etc or whatever other justification. It's just poor code splitting and bundling. There are so many different ways to avoid this or at the very least drastically reduce the size.
...read more