Commit Graph

20 Commits

Author SHA1 Message Date
Vo Minh Thu f5db1d10ec [IMP] openerp.addons.base: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124114730-24m0ftu1wbowg8a0
2012-01-24 12:47:30 +01:00
Raphael Collet 2661edacda [MERGE] translations: import using lower-level sql (translations load about 6 times faster)
bzr revid: rco@openerp.com-20111223104824-fup1cjbjni1fsty1
2011-12-23 11:48:24 +01:00
Vo Minh Thu 842cb1ad41 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20111201153214-0iintvpp7crnr2jc
2011-12-01 16:32:14 +01:00
Olivier Dony 52eb2fae1c [FIX] ir.translation: keywargs not supported when clearing caches
bzr revid: odo@openerp.com-20111129093800-4bsldbpjh1q4zix1
2011-11-29 10:38:00 +01:00
Numerigraphe - Lionel Sausin 9ed5cbb24c [FIX] unmutable defaults in base addons.
bzr revid: ls@numerigraphe.fr-20111107151949-n9prrufvqe3ohz18
2011-11-07 16:19:49 +01:00
Olivier Dony 01e9e63423 [FIX] ir.translation: one more fix for ormcache_multi.clear_cache()
(Reported by Thibaut Dirlik)

bzr revid: odo@openerp.com-20110913174310-w79dgmybs59fb9xm
2011-09-13 19:43:10 +02:00
Olivier Dony f59aaf7ca0 [FIX] ir.translation: second part of previous revision for fixing calls to ormcache_multi.clear_cache()
bzr revid: odo@openerp.com-20110909104046-ipysy6pi3iea38fu
2011-09-09 12:40:46 +02:00
Antony Lesuisse 78626b885c [FIX] ir_translation _get_ids clear_cache is not multi
lp bug: https://launchpad.net/bugs/838864 fixed

bzr revid: al@openerp.com-20110909100709-kdqf4aibdr0flr4a
2011-09-09 12:07:09 +02:00
Olivier Dony eab6a77a26 [IMP] ir.model.data: usability - rename `XML ID` -> `External ID`
bzr revid: odo@openerp.com-20110906075711-lev8g5tkfhc9j3c1
2011-09-06 09:57:11 +02:00
Antony Lesuisse ef3935553c [FIX] ir_translation cache invalidation
bzr revid: al@openerp.com-20110902155834-rmno5z7aavj71fk5
2011-09-02 17:58:34 +02:00
P. Christeas f1558730f6 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
2011-06-08 19:20:59 +03:00
Antony Lesuisse 759c3bb6d6 [MERGE] trunk
bzr revid: al@openerp.com-20110608153139-zsf80dcs108dqzcy
2011-06-08 17:31:39 +02:00
Vo Minh Thu 2d1f8c93dd [MERGE] ir_translation: lang field selection only displays installed languages.
bzr revid: vmt@openerp.com-20110608145033-67n0g3g28pw91c9l
2011-06-08 16:50:33 +02:00
Antony Lesuisse 28a37267e4 [IMP] ir_translation only display installed lang, context in read
bzr revid: al@openerp.com-20110608141806-oeixkg763vgmv2we
2011-06-08 16:18:06 +02:00
P. Christeas 49fbcdb70a ir.translation: select restriction must be an SQL constraint
select fields validate themselves in ORM, through _check_selection_field_value(),
which /retrieves/ the .selection list and checks if value to be written
is among possible ones. This, however, is very expensive for models that
have variable selection lists (eg. ones that require an SQL query).

In fact, for ir.translation, the query would be repeat for every single
write() to ir.translation. The 'lang' field is actually a reference for
res.lang.code (not the .id, sadly), so let SQL implement the constraint
for us.

bzr revid: xrg@linux.gr-20110608093254-ua66p5co6dc203zs
2011-06-08 12:32:54 +03:00
P. Christeas 28e3960004 Revert "[IMP] translation: Added two columns to ir_translation to fix the res_ids after loading is done."
This reverts commit a78cd642cd956afe3f3cee54558b214549f0a9a5.

Conflicts:

	openerp/addons/base/ir/ir_translation.py
	openerp/tools/translate.py

bzr revid: xrg@linux.gr-20110608092941-f2ycamq0k52y4nc8
2011-06-08 12:29:41 +03:00
Antony Lesuisse b5bf0e8c1c [IMP] tools.cache cleanup, 15% speedup
bzr revid: al@openerp.com-20110608092515-gum2y4snkrcrpjqb
2011-06-08 11:25:15 +02:00
Antony Lesuisse 970b19b8b4 [IMP] new tools.cache cleaner, 10% speedup and more to come...
bzr revid: al@openerp.com-20110608030330-d0dsv2k6n0w3lyd5
2011-06-08 05:03:30 +02:00
Antony Lesuisse 6aa240ca19 [IMP] ir_translation only display installed lang, 10% speedup in translation loading
bzr revid: al@openerp.com-20110601163455-2o732ssum24kwshu
2011-06-01 18:34:55 +02:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00