When open 3 documents on same page via JavascriptAPI, the third spotfire page are loaded very slow.
Using the code below based on the example, we found that when open 2 document, the loading performance is ok, however when open 3 pages into same html web page, there will always be a third one loaded very slow.
Is there any setting in Spotfire server to add the allowed api connections or maximum documents can open?
here is the code used.
<html>
<head>
<meta charset = "utf-8"/>
<!--meta http-equiv="X-UA-Compatible" content="IE=edge"/-->
</head>
<body>
<div id="P0101">full</div>
<div id="P0102">full</div>
<div id="P0103">full</div>
<script type="text/javascript" src="http://web-server/spotfire/wp/GetJavaScriptApi.ashx?Version=10.3"></script>
<script type="text/javascript" src="http://web-server/spotfire/js-api/loader.js"></script>
<script>
var c_serverUrl = "http://192.168.21.60/spotfire/wp/";
var c_analysisPath = "/Mashup";
var c_parameters = ""; //Optional configuration block
var customization = new spotfire.webPlayer.Customization(); //Optional configuration settings
var app;
var c_reloadAnalysisInstance = false;
var apiVersion = "10.3";
// Customization of UI
customization.showDodPanel = true;
customization.showStatusBar = false;
customization.showToolBar = false;
customization.showPageNavigation = false;
customization.showClose = false;
customization.showAnalysisInfo = true;
customization.showExportFile = true;
customization.showExportVisualization = true;
customization.showUndoRedo = true;
customization.showFilterPanel = true;
spotfire.webPlayer.createApplication(
c_serverUrl,
customization,
c_analysisPath,
c_parameters,
c_reloadAnalysisInstance,
apiVersion,
onReadyCallback,
onCreateLoginElement
);
function onReadyCallback(response, newApp)
{
app = newApp;
if(response.status === "OK")
{
// The application is ready, meaning that the api is loaded and that
// the analysis path is validated for the current session
// (anonymous or logged in user)
console.log("OK received. Opening document to page 0 in element renderAnalysis")
var doc = app.openDocument("P0101",0,customization);
var doc1 = app.openDocument("P0102",1,customization);
var doc2 = app.openDocument("P0103",2,customization);
}
else
{
console.log("Status not OK. " + response.status + ": " + response.message)
}
}
function onError(error)
{
console.log("Error: " + error);
}
function onCreateLoginElement()
{
console.log("Creating the login element");
// Optionally create and return a div to host the login button
return null;
}
</script>
</body>
</html>