cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

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

mtaghavi
1-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=true

<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">

</frameset>

</html>

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?

Thanks,

2 REPLIES 2

If it's just a timeseries chart, why don't you use a JS Chart Library and call TW REST API and you will have a super performance interface to embed on others.

We have one mashup that is not a time series chart, This mashup contains 5 different panels with other widgets like "valuedisplay" , LED and other widgets.

This mashup takes around 40 seconds to download the combined.js. We can't overcome this even by using external charting libraries.

Top Tags