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

SignalFx is the only real-time cloud monitoring platform for infrastructure, microservices, and applications. The platform collects metrics and traces across every component in your cloud environment, replacing traditional point tools with a single integrated solution that works across the stack.

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.

SignalFx is built on a massively scalable streaming architecture that applies advanced predictive analytics for real-time problem detection. With its NoSample™ distributed tracing capabilities, SignalFx reliably monitors all transactions across microservices, accurately identifying all anomalies. And through data-science-powered directed troubleshooting SignalFx guides the operator to find the root cause of issues in seconds.

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 }}