diff options
| author | Raphael Collet <rco@openerp.com> | 2015-09-15 16:02:02 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2015-09-16 11:56:44 +0200 |
| commit | bd092e9ce77059f240819844cb9093ffa85279f8 (patch) | |
| tree | 35bcad481d8104c6ec0d738d8c9fc4da1b60ae84 /addons/website/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js | |
| parent | 5805b87005f000900353c8b2f98f9cf037cb3050 (diff) | |
[IMP] models: optimize recomputations by saving values in record batches
The recomputation of a field `name` on `recs` is done roughly like this:
for rec in recs:
rec._write({name: rec[name]})
The effect of this patch is to group records by value `rec[name]`, and to
update records in batches like:
recs.write({name: val}) # rec[name] == val for all rec in recs
As a consequence, less queries are issued to the database for updating records.
This improvement is very effective in the case of migrations!
Diffstat (limited to 'addons/website/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js')
0 files changed, 0 insertions, 0 deletions
