Currently RECORD_CACHE_SIZE is found in const.py. But today, trying to improve the performance when updating modules in the database, I found that increasing the size from 2000 (the default) to 20000 (probably 7000 would have already worked) made a huge difference.
Updating the country module in a database with Spanish language installed went from more than ten minutes (didn't let it finish) o 60 seconds. This is the second time I found that increasing this value has an important impact on performance (previous was sale orders with a huge number of lines), so I propose to make this value configurable in trytond.conf. Maybe the default value could also be changed from 2000 to 8000, so a very standard module such as country can be installed without huge performance degradation. PS: The reason that there's such a huge difference is that importing the .po files we have a dictionary which accesses randomly to all ir.translation records of the module. As the access is random, the system keeps querying the database all the time. A value of 8000 ensures all records fit in memory and thus no trashing occurrs. Maybe the algorithm can be changed to access the database sequentially and access the .po randomly. Still, I think making cache size a configurable can be useful for other cases. -- Albert Cervera i Areny http://www.NaN-tic.com Tel: +34 93 553 18 03 http://twitter.com/albertnan http://www.nan-tic.com/blog -- -- [email protected] mailing list --- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
