While exploring the showcased manual integration of a response Gzipping library into your SAP HANA Cloud application here, probably most of you were already expecting to hear “Next stop: platform’s own way of handling this”. Well, we are pleased to announce that the SAP HANA Cloud platform has already brought you to this station. Application developers can now specify that their application responses should be compressed, via dedicated deploy-time settings and configurations.
Take a look here at how to achieve this, using the console client for getting your ticket to compression. Certain flexibility is in place here, like specifying the MIME types for the files that are to be compressed, or the minimum file size threshold for the compression. We can encourage you to try this out with your own application, and see for yourself how this new feature suites you best. While certainly one can continue to rely on handcrafted compression solutions by using third party libraries, or by performing the compression in the very application, this is now much easier with the platform being ready to take care of it for you.
Here are the numbers we got with the sample explore-ui5 application from the platform’s SDK. Without compression specified we have the initial page load experience looking like this:
The details for the largest file sent to the browser are:
With enabling the –compression force option on deploy, corresponding diagrams show:
which from a first look seems comparable to what webutilities was able to do for us before. A major advantage of choosing the platform’s out-of-the-box capabilities, however, is that the application does not grow with yet another dependency and corresponding resource footprint, as well as maintenance efforts.