Home screen and loading of widgets

2
I have started today to do some analyzes on performance with firebug. I noticed that when loading the home screen that all the javascript of every widget in the model got loaded. I fail to grasp the reason for this. I would have expected it would only load the javascript of the widget that are indeed on that homepage and that the other javascpripts would get loaded when a form was served with this widget. Am I missing something here? Any way to influance this? All those ms together is quite a lot. Regards, Ronald
asked
1 answers
0

We noticed that in production, this gives the best performance for two reasons:

  1. bundling all widgets together offers the best compression (and thus overall amount of bandwidth needed)
  2. performing many different requests incurs a relatively large performance hit, it's better to perform it once and only have the roundtrip once.

The latter is what you're seeing in your graph: you're getting all 304's, which are pure requests without any payload (your webbrowser is asking the server if there's a new version. There isn't, so it's using it's local version).

In production, you're going to see two things:

  1. from 5.16 on, all custom widgets are bundled, so only one request for custom widgets. Due to compression this actually doesn't really eat up that much performance
  2. we've improved the caching configuration vastly. You shouldn't even have to perform a 304 request if you haven't redeployed.

All in all, the first time you visit a Mendix app, it'll be slightly slower, but after that all pages and reloads will be extremely fast.

answered