Commit Graph

17 Commits

Author SHA1 Message Date
Christophe Simonis d1031c34ac [FIX] ormcache: correct stat counter usage. 2015-04-13 13:17:23 +02:00
Christophe Simonis 14fd77c132 [FIX] core: ormcache is now per regisry.
A cross-registry cache was introduced by e2ea691ce.
The initial idea was praiseworthy but sub-optimal for servers with a
lot of registries.
When there is lot of registry loaded, the cache size was huge and
clearing some entries took a lot of CPU time, increasing the chances
of timeout.

Also, the cache was not cleaned when a registry is removed from
registry LRU (this operation would also consume time).
2015-04-03 16:11:57 +02:00
Raphael Collet c58121e8f1 [FIX] method `ir_model.check` now decorated with `ormcache_context`
The method needs the `context` parameter to translate the error message in case
the access is denied and an exception is raised.
2015-03-26 17:14:42 +01:00
Raphael Collet 5aa23f8280 [IMP] ormcache: compute hit/miss/err statistics per database
In ormcache, those statistic numbers were counted per cached method for all
registries.  We introduce separate statistic counters, and create a counter per
(database, model, method).  The existing attributes that are no longer used
have been removed.
2015-03-23 14:36:15 +01:00
Raphael Collet b156c2e27e [IMP] registry: adapt LRU sizes for registries and ormcache
The registry size is now assumed to be around 10Mb, and ormcache size is
proportional to the maximum number of registries.  Statistics about ormcache
usage is shown to the log when receiving signal SIGUSR1.
2015-03-23 14:36:15 +01:00
Raphael Collet e2ea691cef [IMP] ormcache: turn it into a global LRU cache shared among registries
The ormcache is now shared among registries.  The cached methods use keys like
(DBNAME, MODELNAME, METHOD, args...).  This allows registries with high load to
use more cache than other registries.
2015-03-23 14:36:14 +01:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Fabien Pinckaers 4a3529afdf [IMP] Performance improvement: improved cache with context, better get_object
bzr revid: fp@tinyerp.com-20131130154723-05r90b2yhwwovpx4
2013-11-30 16:47:23 +01:00
Xavier Morel a622a5ad55 [FIX] remove handling of parameters in ormcache clearing
It's completely broken in case of optional parameters
e.g. (ir.translation)._get_source, as a call with the optional
parameter won't be matched by a clear without, and the other way
around. This becomes even more problematic in the website branch as
_get_source now has *two* optional parameters (source and res_id).

After discussion with odo and discovery that in multiprocess only the
current node will use any granularity (other nodes not only clear all
of the current method cache, but all caches of all models), simplify
cache clearing, ignore parameters and just blow the current method's
cache entirely.

bzr revid: xmo@openerp.com-20131024132956-4tl3prum8za47igy
2013-10-24 15:29:56 +02:00
Antony Lesuisse 3d2a09a973 multiprocessing signaling manually backported from 6.1
bzr revid: al@openerp.com-20121208181151-lfy956ysnok5b5hf
2012-12-08 19:11:51 +01:00
Antony Lesuisse ce552adba0 [MERGE] therp-nl/openobject-server/openobject-server_ormcache_key cache not working correctly with skiparg
bzr revid: al@openerp.com-20121017162555-tkydd6uq6fpm3a5i
2012-10-17 18:25:55 +02:00
Numerigraphe - Lionel Sausin a2f4f2669b [IMP] Added missing vim mode lines
lp bug: https://launchpad.net/bugs/524279 fixed

bzr revid: ls@numerigraphe.fr-20111122085848-1atcrcw8e64altcp
2011-11-22 09:58:48 +01:00
Vo Minh Thu bdd0c7cf3f [IMP] simplified cache implementation (and stored on the osv), does not support contexts.
bzr revid: vmt@openerp.com-20110830121541-abov2wezdn6kl2dc
2011-08-30 14:15:41 +02:00
Vo Minh Thu 174e25e66f [IMP] tools.cache: removed unused variable.
bzr revid: vmt@openerp.com-20110826121639-irm0g0eh5yec1c88
2011-08-26 14:16:39 +02:00
Antony Lesuisse 4be82ffd52 [FIX] remove debugging
bzr revid: al@openerp.com-20110824222330-zrfnr4qme71r9oqi
2011-08-25 00:23:30 +02:00
Antony Lesuisse b687cc3bb4 [FIX] remove unused clear function
bzr revid: al@openerp.com-20110824150122-ejryb7ni1l92d1hp
2011-08-24 17:01:22 +02: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