Oracle Visual Builder applications are composed of multiple files including HTML files defining the UI, JavaScript files with coded function logic, and JSON meta-data files for pages, flows and actions. All this data, in addition to several javascript libraries, needs to get to the end-user's browser to correctly render your application. But did you know that you can reduce the size of the data being transferred to the client, and help cache it for future access – and as a result create a faster loading and operating app?
Visual Builder Studio makes it easy to optimize your application with a specific "optimize application" checkbox that is part of the package visual application build step. When you check this checkbox we'll be using a bunch of utilities to compress your app, reduce the number of files involved, and enable resource caching – creating an optimized app ready to be published. If you are not using Visual Builder Studio to package and deploy your app, you can leverage the Visual Builder vb-optimize grunt tasks to do the optimization and deployment of your app and achieve the same results.
Once you optimize your application, you'll notice that we no longer download individual files for each page and action in your app when you access or invoke them. In addition, you'll see that when you invoke the same app again on the same browser many of the files we downloaded the first time you accessed the app are now retrieved from the browser's cache – further accelerating your app's performance. You should only see REST calls that access the data layer being invoked now.
Here is a quick video showing you the before and after of running an app:
Note that this compression of files is not happening automatically if you go through the Visual Builder stage/publish steps. While you'll notice that it will allow for the files to be cached, you'll still see the individual files being accessed each time.
Update April 2024 – There is now an option to indicate to optimize the app when staging/publishing the app in the standalone Visual Builder too. Check the application settings for the check box.
If you haven't done it already, we highly recommend you leverage this optimization step before you publish your application to your end users.
Also, if you are working on evaluating the performance of your application in order to optimize runtime behavior, you should focus on testing an optimized app rather than looking at an application that is in preview mode. In addition to the optimization mentioned above you'll also see improvements in the performance of accessing business objects in your app, as a deployed app leverage connection pooling to the DB and reduces the connection time to interact with the database compared to an app that you run in preview mode.
Here is the same page displayed after a complete refresh before and after. The optimization and deployment cut performance by about a factor of 5, going from close to 20 seconds to less than 4 seconds.
Before:
After:
Looking for even more tips on optimizing the performance of your VB app? Check out this recorded seminar with additional optimization and performance tuning tips.
