Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API Visualization
Created by Guest
Created on Mar 14, 2019

An idea to improve CustomVisualization loading performance

So far, at least in WebPlayer, each time, when user switch back to our visualization from another page, all the HTTP content (js, css...) of the custom visual will be reloaded through GetResourceCore() API. The browser can't cache them as a normal http content because they are not loaded from HTML directly.

The issue can be resolved by writing absolute path for the imported http content in the index.html, instead of relateive path. In this way, the browser will request and cache the resources directly, but we have to store these static resouces out of SPK.

If this is an common problem for Spotfire, we really hope TIBCO can improve it.

In our design, all web static files are stored in <webroot> folder in our SPK, not in .net dll resources. If Spotfire can assign an independent URL for our resources and bypass the GetResourceCore() when browser loading them, then browser will cache them at first loading. It will improve the user experience greatly.

  • Attach files
  • Admin
    Magnus Rylander
    Reply
    |
    Aug 31, 2021

    A highly cached CDN (see e.g. https://mashable.com/roundup/best-content-delivery-networks) can deliver web content much faster than the internal Spotfire web server. If we look at the example in https://community.tibco.com/wiki/create-custom-visualization-tibco-spotfire:

    "Technically, when the end user creates a visualization of your custom type, what will happen internally is that an "embedded web client" (an iFrame html element) will appear on the current page, and that web client will make an http request with the URL "/". That request will be routed to call the above method GetResourceCore. In the example above, MyVisual.html will be retrieved. That html file may in turn load any resource:

    <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>

    <script src="myscript.js"></script>"

    Instead of hosting myscript.js locally in Spotfire, it can be hosted externally in a CDN, similar to what is done with the jquery script. The same can be done for all scripts, images etc.

  • Admin
    Magnus Rylander
    Reply
    |
    May 20, 2021

    Visualization Mods have much better loading performance since all static resources are cacheable out of the box.