When loading a form it can be useful to know how it manages the loading of various form elements. Having done some testing around sub-grids on forms with Fiddler I have identified the following results:
Sub-grids are the last form component to be loaded, and each sub-grid is loaded in parallel to each other.
This means that multiple sub-grids on a form should not hinder performance if your computer and network can handle running the requests in parallel. It does however mean that typically you can expect an entity with even 1 sub-grid to take longer to load than an entity with none.
A more important note gathered from my testing was that sub-grids within a collapsed tab are not loaded when the form loads, but rather when the tab is expanded.
Given the form above I ran 2 tests, 1 starting with the “3 Entities” tab expanded, and the other with it collapsed. The results are as follows:
“3 Entities” tab expanded by default:
As can be seen, the 3 sub-grid requests are run after the rest of the form has loaded. However if we look at my screenshots below for what happens when I load just the form with the sub-grids collapsed we can see that not only do we now have control over when we want the sub-grids to load (by expanding the tab), it also appears that the main form has a quicker load time.
“3 Entities” tab collapsed by default:
We can now expand the tab separately which prompts the following requests.
Form loaded with “3 Entities” tab collapsed by default, and then later expanded:
This gives us the ability to split up the form load time into smaller chunks so users are able to access just the important information quickly without having the slight delay to wait for often unnecessary sub-grids.