2 Replies Latest reply on Feb 14, 2017 7:04 AM by mtaghavi RSS
    mtaghavi Newbie

    Performance Issue: Decrease Combined.JS download time and execute platform services only once with multiple mashups.

    We have 5 mashups, Each mashup is a time series chart. Each mashup is embedded into web page within different frame. So, On loading the web page, Each mashup creates its own session. As we have 5 different mashups through frames in a single webpage, So single web page loads chart library 5 times because of 5 mashups. Background services like getAllStyledefinitions", combined.js files are taking around 20 seconds to download upon initial load. After these loads complete our service start to load and take approx 5-6 seconds. But because of initial download of platform, Web page is taking around 25 seconds overall in loading.


    Also GetAllSytleDefinitions and related service requests are called synchronously even on embedding 5 mashups in 5 different frames. Please see below the demo setup:



    <html >


    <frameset rows="20%,20%,20%,20%,20%">


    <frame src="https://domain.cloud.thingworx.com/Thingworx/Runtime/index.html?appKey=xxxxx-xxx-xxx-xxxx&x-thingworx-session=true#mashup=Mashup1">


    <frame src="https://domain.cloud.thingworx.com/Thingworx/Runtime/index.html?appKey=xxxxx-xxx-xxx-xxxx&x-thingworx-session=true#mashup=Mashup2">


    <frame src="https://domain.cloud.thingworx.com/Thingworx/Runtime/index.html?appKey=xxxxx-xxx-xxx-xxxx&x-thingworx-session=truemashup=mashup3">


    <frame src="https://domain.cloud.thingworx.com/Thingworx/Runtime/index.html?appKey=xxxxx-xxx-xxx-xxxx&x-thingworx-session=true#mashup=Mashup4">


    <frame src="https://domain.cloud.thingworx.com/Thingworx/Runtime/index.html?appKey=xxxxx-xxx-xxx-xxxx&x-thingworx-session=true#mashup=Mashup5">





    By debugging the mashup in chrome, we saw that five times call of GetAllStyleDefintions, GetAllStateDefinitions and GetEffectiveTokens  are synchronized. But by the above you can see all 5 mashups are being called in 5 different frames. So these services should be async.


    Any recommendation to ignore performance hit by combined.js and getStyledefinitions?