ADF Postback Payload Size Optimization
Learn how to improve performance by having ADF requests send HTTP requests only for changed values, speeding up the server.
Join the DZone community and get the full member experience.Join For Free
Recently, I came across a property called oracle.adf.view.rich.POSTBACK_PAYLOAD_TYPE. This property helps to optimize postback payload size. It is described in ADF Faces configuration section A.2.3.16 Postback Payload Size Optimization. ADF partial requests execute an HTTP post with values from all fields included. When the postback property is set to dirty, it will include only changed values in the HTTP post. As result, the server will get only changed attributes. Potentially, this can reduce server time processing and make the HTTP request size smaller. This can be especially important for large forms with many fields.
Let's take a look at an example. After clicking on any button in the form, go to the network monitor and study the Form Data section. You will see IDs and values for all fields included in the UI. All fields are submitted with an HTTP request by default, even if these fields were not changed:
Postback optimization property can be set in web.xml. By default, its value is full, change it to dirty:
With the value set to dirty, try to change at least one field and then press any button. Observe the Form Data section in the network monitor — only fields with changed values will be submitted:
Try to test it in your project and see the difference.
Check my sample app for this use case on GitHub.
Published at DZone with permission of Andrejus Baranovskis, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.