(This post is a reply to this thread http://www.openerp.com/forum/topic22033.html, but could not be posted because of a fault that wrongly rejected this reply as spam.)
I suspect that there are a few things that need fixing in OpenERP for performance:
- Add indexes where appropriate/needed.
- The database structure does not have fields for running totals for Inventory Quantities on Hand or General Ledger Account totals, or Partner Balances. Hence, these figures have to be calculated every time by summing up all contributing transactions – very inefficient.
- Order the updating of data so that deadlocks are precluded – see deadlocks experienced by Saïd in the example in the forum (see the link above). In other words, if you have two sales orders, one with product A on line 1 and product B on line 2, and one with product B on line 1 and product A on line 2, then when you go to update those products in the one database transaction per user, you can get a deadlock if your timing is right, and with 40 users this would probably be the case. The way to prevent deadlocks is simply to enforce that the required resource is locked in a predefined order such as alphabetical order, e.g. you want the first user to lock A then B, and second user must also do A then B, not have the first user lock A then B and the second user lock B then A and so be prone to a deadlock. The same goes for any other commonly-used resource.
- I suspect that the ORM needs to be industrial-quality so that it can not only be multi-threaded and also multi-instance, in which case it will need to support distributed caching. NHibernate (or its equivalent for Python), anybody? Or ActiveRecord?
See this issue in the OpenERP Forum for related details here.
- Make sure all tables have a sensible index. OpenERP doesn’t create any indexes by default; this will cause serious performance issues once data grows to a reasonable size. Solution: Add indexes!
- Run on Jython or IronPython, to resolve Python’s performance issues, as noted here: Python’s GIL is evil, and Google searches for the holy grail of Python performance.
- This issue on performance in the OpenERP Forum.