summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/lib/dhtmlxGraph/codebase/dhtmlxchart_debug.js
diff options
context:
space:
mode:
authorP. Christeas <xrg@openerp.com>2011-06-08 19:20:59 +0300
committerP. Christeas <xrg@linux.gr>2011-06-08 19:20:59 +0300
commitf1558730f64658e4b55a4f78b023556c1f3f4517 (patch)
tree0771bda909dfca38b79bc8305bccf308e43d30b0 /addons/web_graph/static/lib/dhtmlxGraph/codebase/dhtmlxchart_debug.js
parentd4f82fbd8c557d779fa883eda060e60fc972235c (diff)
ir.translation, import: push the algo. to SQL, improve performance
At a language import (translation files), we want to push a big batch of translation records into the database. These will need update-or-insert logic (against existing ones) or even resolution of ir.model.data . Doing this loop in Python had been slow (invoking 2x read()s, +1 for ir.model.data, 1 insert or update), triggered the cache (fill and clean at each iteration). Instead, follow the old-school db recipe for mass records insertion: - create a temporary table w/o indexes or constraints - quickly populate the temp with all records of the batch (through a dedicated "cursor" object) - process the table, doing lookups in collective SQL queries (yes, SQL is all about loops of data processing, efficiently) - insert all records from temp into ir.model.data - call (implicitly) all constraints of ir.model.data at the end of that single query. This improves performance of translation imports by ~3x at least. bzr revid: xrg@linux.gr-20110608162059-rfy1vvwp8w66ry0i
Diffstat (limited to 'addons/web_graph/static/lib/dhtmlxGraph/codebase/dhtmlxchart_debug.js')
0 files changed, 0 insertions, 0 deletions