Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
adecora
Contributor II
Contributor II

Mashup in external server with RequireJs [load time]

Hi! I'm currently using requirejs to load qlik on my mashup:

```index.html

\<script

      src="../../resources/assets/external/requirejs/require.js"
      data-main="index.js"
    \>\</script\>
```
 
```index.js
var config = {
    host: window.location.hostname,
    prefix: window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 ),
    port: window.location.port, isSecure: window.location.protocol === "https:"
};
 
require.config( { baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources" } );
   
require( ["js/qlik"], function ( qlik ) {
    console.log(qlik);
});
``` 
 
The problem with this approach is that the requirejs provided by qlik import a lot of js modules which last about 12 seconds, which is quite a lot just load the mashup. Is there any other ways to be able to use the qlik API on the mashup?
 
adecora_1-1744196232638.png

 


 

 
 
Labels (2)
2 Replies
alex_colombo
Employee
Employee

Hey @adecora , if you are experiencing that amount of time for getting requirejs, you should have the same time loading a native Qlik app from hub, is that correct? If so, you have to investigate if you have any issues from infrastructure side.

About using a different approach on embedding, yes you have multiple options on this approach.

adecora
Contributor II
Contributor II
Author

Hellou @alex_colombo, actually that`s right on opening an empty app on the hub It spends about 14 seconds to complete.

adecora_0-1745401343861.png

 

Infrastructure is managed by an external company, so I have no access to it. Also I checked about made a mashup with nebula.js but is need a webIntegrationId and it´s not provide by the company who manage the infraestructure.