Details
Description
After a page is initially loaded, the first Ajax request will trigger a larger than necessary update due to the changing ViewState values in the hidden input fields. This will typically mean that the full form is always sent back as the first update.
I modified the DOMResponseWriter to use a similar strategy to what we do with Mojarra. That is, when MyFaces adds the ViewState elements, we identify it and store it for later removal. We allow the response to be written back (including all the ViewState elements) and then remove them from the DOM after. This way, they are not in the DOM when a DOM diff is done and don't trigger the larger updates.