Losant Dashboards Speed Hampered by Context Variable Usage

HI All,

Reporting in to see if there is a way to mitigate the effect of using context variables within a dashboard affecting it’s overall loading speed?

We have a number of dashboards which are both internal and client facing. We’ve observed an apparent drop in page loading speeds with our dashboards which utilise the context variables to change the view of the dashboard between devices. These context variable dashboards often include a map block, which could be contributing to overall speed of the dashboard loading.

Are there any other similar observation made with other’s dashboards? Any possible mitigation’s to improve dashboard performance?

When dashboard context is passed, the browser makes one additional network call to validate the given context before proceeding with loading data for the blocks. So yes, we expect it would be just a tad slower but nothing like you describe.

Are any of the dashboards in question public? If so could you post a URL or at least send us an ID (from the end of the dashboard’s URL) so we can look internally?

Note: The OP sent a link to the dashboard in question privately.

I ran a benchmark test in Chrome 71.0.3578.98 in a Macbook Pro (15-inch, 2018) running OS 10.14.2.

Five times I loaded the dashboard from a full page refresh and all resources - page markup JS files, map images, block data - finished loading in the following times:

4.77s
4.36s
4.33s
4.69s
4.59s
= 4.55s average

When one context variable for a device ID was applied, the load times were as follows, with the individual time of the “validate context” call provided in parentheses along with each full time:

4.53s (52.19ms)
4.76s (51.56ms)
4.60s 60.42ms)
5.11s (81.28ms)
4.57s (46.47ms)
= 4.71 avg (58.18ms avg)

That’s an average difference of 160ms when context is applied - so a difference, yes, but not one I would consider major.

Can you provide a little more information on your setup? For example, your operating system, hardware, browser and version, and if you’re applying a device tag as context? I saw it was possible to apply one in the dashboard but I don’t know any valid tags to apply.

I should also note that my method for benchmarking was to use Chrome’s Inspector and Network tab, using the “Finish” time at the bottom of the tab after all data had been loaded, and also individually inspecting the “validateContext” call.