W3C home > Mailing lists > Public > public-xformsusers@w3.org > March 2017

Overview of Deferred Updates

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Fri, 31 Mar 2017 17:47:57 +0200
To: " XForms" <public-xformsusers@w3.org>
Message-ID: <op.yxy157dasmjzpq@steven-xps>
Essentially, deferred updates are a mandated optimisation for groups of  
<setvalue/>, <insert/>, and <delete/> actions (and synchronous  
<submission/>s).

In general, an action being processed does not cause an update of the  
model until it is finished; all its changes are bundled together before  
updating. If it causes a change, the model is marked for either rebuild or  
recalculate.

However, that means that in order to work, some actions have to do an  
update before, and some have to do an update after their real task.

    show: update before
    hide: update before
    setfocus: update before
    setindex: update before, mark
    toggle: update before, mark
    asynchronous submit: update before, update after
    synchronous submit: update before, mark
              (so xforms-submit-done needs an update if it uses any values)
    reset: update after

    setvalue: mark
    insert, delete: mark rebuild

This means that any action that needs to use a value that needs to be  
updated, has to explicitely invoke <rebuild/> and/or <recalculate/>
(for instance <message/> needs to do an an update if it outputs a  
dependent value.)

Steven
Received on Friday, 31 March 2017 15:48:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:48 UTC