Performance of private embedding

Options
Jones01
Jones01 Contributor
edited February 1 in Domo Everywhere

Hi, we are embedding using the flow described in this diagram but find it quite slow. 5-10 seconds to eventually render the board. Has anyone else found this or found a way to improve it?

Tagged:

Answers

  • MattTheGuru
    MattTheGuru Contributor
    Options

    Depending on if you are rendering one dashboard or many at different times there are some ways to improve the speed.

    Software Improvements:

    #1 If you are toggling between dashboards example.clearsquare.co (these are public however), then you should cache the authorization token on the server and re-use it for any future dashboard instead of calling the auth API individually for each one.

    #2 Split up the dataset that is powering the dashboard into smaller datasets and implement Dataset Switching.

    #3 Lazy load the iframe before the user comes in contact with it (i.e. load the dashboard in the background and keep it hidden until it is needed).


    Usage Improvements:

    #4 Although this isn't a "tricky software way" to reduce load speed, one of the ways is to just reduce the number of cards on a dashboard.

    #5 Make sure your hosted server is in the same location (or as close as possible) to the Domo data warehouse of your area.

    Hope that helps^

    ** Was this post helpful? Click 💡/💖/👍/😊 below. **
    ** If it solved your problem. Accept it as a solution! ✔️ **

  • Jones01
    Jones01 Contributor
    edited February 1
    Options

    @MattTheGuru

    Thanks for your suggestions. Yes we had cached the access token and that does improve things a bit but on the second call the authentication is slightly quicker anyway.

    The dataset is quite large but the board is much faster when accessed within the instance itself. Possibly the programmatic filtering slows down the load when embedding?

    I think we'll lazy load it like you have suggested and then make it visible (hopefully can force the cards to refresh when we do this). I also hope the cards all render ok in an hidden iframe. Worth a try though.

    I think we are in the same aws region as the domo instance.

    Thanks again.

  • Jones01
    Jones01 Contributor
    Options

    @MattTheGuru Hi again.

    We are going to go down the route of lazy loading the boards into iframe. If the iframe has been alive for a while we want to refresh the dashboard. Ideally we don't want to refresh the iframe itself.

    Do you know of a simple way to just call refresh on all of the content? I assume via the js api?

    I suppose we'd be looking to just reapply any filters selected so the data is updated.

    Thanks

  • MattTheGuru
    MattTheGuru Contributor
    edited February 2
    Options

    @Jones01 I have three comments about this:

    #1 If you are on the consumption model there will be a cost associated with "refreshing" at intervals. Each individual card counts as an impression. So you do want to make sure you only refresh when actually needed (it might be best to just put a button at the top that says "Refresh" and some text that says something like "Last refreshed 6 minutes ago".

    #2 Technically Domo docs say that there is a "periodic refresh". I don't believe I have ever personally observed this, but Domo says the dashboards data refreshes. I have a lot of experience with embed and this doesn't seem 100% correct.

    #3 If you do want to go this route, unfortunately there is no simple call that can be made to the iframe to just reload the content. And because you'd likely wish to avoid "loading lag" during each of your reload intervals I would do the following:

    - Let's say you want to reload after every 5 minutes. I would make a call to Domo for a new iframe and then load that iframe in a <div> that has 0px height and 0px width with all overflow hidden (so the user doesn't know it's being loaded (until it has completely loaded the Domo content).
    - At this point I would increase the height and width of this new iframe to full and apply the shrinking styling to the old iframe so there is no witnessed "loading lag".

    *Sorry there is no "easy way" to do this :)

    ** Was this post helpful? Click 💡/💖/👍/😊 below. **
    ** If it solved your problem. Accept it as a solution! ✔️ **

  • Jones01
    Jones01 Contributor
    Options

    Hi @MattTheGuru thanks again for your prompt reply.

    On point number 2. We have tested this in the past and can confirm that the dashboards embedded don't periodically refresh and also do not refresh (unlike boards on the instance) when the underlying dataset changes.

    Yes agree I think we can just refresh an iframe in the background and swap it out. I had thought there would be a way with the js api where we could just apply filters perhaps with empty filters so the cards just refresh themselves.