Over a million developers have joined DZone.

ADF Postback Payload Size Optimization

DZone's Guide to

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.

Free Resource

Sensu is an open source monitoring event pipeline. Try it today.

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:

Image title

Postback optimization property can be set in web.xml. By default, its value is full, change it to dirty:

Image title

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:

Image title

Try to test it in your project and see the difference.

Check my sample app for this use case on GitHub.

Sensu: workflow automation for monitoring. Learn more—download the whitepaper.

performance ,performance optimization ,tutorial ,adf

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}