cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Content Compression

konstantin_anikeev
Active Contributor
0 Kudos

Dear Experts,

is it possible to switch a content compression for SAPUI5?

Playing with developer preview js/json/css I got a compression up to 1/5 of it's original size.

For desktop development it is not critical, but for Mobile Development it could reduce a load and responce times...

Best Regards

Konstantin

Accepted Solutions (1)

Accepted Solutions (1)

AndreasKunz
Advisor
Advisor
0 Kudos

Hi Konstantin,

you are right: size matters definitely and there are ongoing efforts to find new ways to reduce it.

In your specific case it seems to be about gzip compression, and that's not something which can be built in to the library, but needs to be negotiated between server and browser, so it depends on the server configuration.

The usual steps like minification of code (removing comments and unneeded whitespace and renaming local variables) are done for the optimized build anyway, but any result of such size reduction will still be compressible with zip.

But sheer size mostly affects transfer time, due to needed bandwidth. There are other factors - obviously number of requests, but also script parsing time, which actually is mainly determined by the code complexity, not by the code size. So just getting the code smaller will only help to some extent. Getting less code is also important.

As I said: it's an ongoing task.

Regards

Andreas

konstantin_anikeev
Active Contributor
0 Kudos

Hi Andreas,

yes, in my case it's a server (Apache) compression.

But it would be great if compression will also be supported by SAP Servers.

From my experience, compression results can be cached on Server side and should not be a performance issue.

Best Regards

Konstantin

AndreasKunz
Advisor
Advisor
0 Kudos

Hi Konstantin,

well, SAPUI5 does not come with an included server, it is just a JS library that can be served from any server. And I agree that such servers for sure should have a way to enable compression.

But the JS library itself cannot influence this.

Or do you refer to specific servers that come with SAPUI5 included?

For Java servers UI5 comes with a resource servlet which might be able to add gzip compression for UI5 library files saved through this servlet. But I think this should really be done on server level, so it will cover ALL files, including those that are part of the application, not the library.

I just checked https://sapui5.netweaver.ondemand.com/sdk and observed that there is gzip compression for HTML and CSS files, but not for the JS or JSON files. I'll check whether I can find someone to improve the server configuration there.

Regards

Andreas

konstantin_anikeev
Active Contributor
0 Kudos

Hi Andreas,

yes, I ment https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js

This address is official recommendation for developers and public applications, as far as I understood.

Best Regards

Konstantin

AndreasKunz
Advisor
Advisor
0 Kudos

Hi Konstantin,

I think this is only a trial address. Most notably because depending on the browser settings loading UI5 from this location in an app residing on a different server will not work in IE8 and maybe IE9 (cross-domain AJAX calls, no CORS support).

So productive environments anyway need a different UI5 installation.

But nevertheless, I try to do something about it (not so easy to find the responsibles for that server).

Best regards

Andreas

Answers (1)

Answers (1)

azmanhamid
Explorer
0 Kudos

Just to add, if running SAPUI5 from backend ABAP engine. You can enable compression via the SICF service compression option.