The Battle of Odoo: The Fastest Odoo Version in 2022

Indrajaya
IT Paragon
Published in
3 min readApr 26, 2022

--

Photo by CHUTTERSNAP on Unsplash

One of the real benefits of using an open source software is that users can access and analyze the code for any reason or aspect. As time goes by, more and more features are added as well as bug fixes. These changes can also affect the speed at which Odoo executes commands. In this article, I lay out whatever I found during testing on which version I should focus more on to benefit from its performance.

The test will be perform inside the container. Working with container, like docker makes developer lives easier. Just write the configuration and docker will handle the rest.

Configuration

The docker compose configuration I used is written below.

Database

To generate database and install addons can be perform using script below. The database name use nomenclature d_<version> and the container name t<version>.

Testing Tool

There are many stress test tools available in the market, from free / open source to paid. I use my own script to perform the test instead of using available tools. Many thanks to my colleague Hendra Priyana Mirantika who wrote the initiation code so I can extend it to meet the requirement. The script using endpoint /web/dataset/call_kw instead of /xmlrpc/2/object. The endpoint /xmlrpc/2/object is used to call methods of odoo models via the execute_kw RPC function. The client that call execute_kw (e.g. xmlrpc client) will raise exception if the remote method return nothing. That’s the strong reason of using /web/dataset/call_kw because it always return an non empty dictionary so it will compatible with client call requirement.

I put the script here. Everyone can improvement it to meet specific requirement.

Scenario

I choose the simple scenario then everyone can extend the complex one if needed. Every version will perform the same scenario. The number of products tested is 70 pieces and 100 purchase orders. The testing process is carried out sequentially. The query to database is not part of the testing because lack of time. The scenario can be extend to any module, sale for example.

Not every version have the same method to perform an operation. For example, Odoo version 13–15 (v.13 — v.15) remove account.invoice model and merge invoice to account.move. So, the validation method action_invoice_open that use in v.11 — v.12 has been changed to action_post in v.13 — v.15.

This is the testing step :

  1. Turn off ir.cron to avoid distraction during testing
  2. Populate master data (product & contact). The product name was taken from https://www.halfyourplate.ca/fruits-and-veggies/fruits-a-z/
  3. Create purchase order
  4. Confirm purchase order
  5. Validate receipt
  6. Create vendor bill
  7. Validate vendor bill

Result

The results exhibit that Odoo v.13 is the fastest in most scenario.

But, it doesn’t mean v.13 is the winner for every scenario for other addons. It must confirm through testing scenario. The challenge is what the cause v.13 run faster than the latest version. According to https://portcities.net/blog/odoo-tutorials-1/post/how-to-seamlessly-migrate-from-an-old-odoo-version-to-the-latest-one-a-complete-guide-28, v.13 is faster than v.12 for partner creation, modify sale order, create & post invoice. And v.14 is faster than v.13 on website area.

The interesting fact is validate vendor bill in v.14 and v.15 takes no time to validate. Looking the vanilla code can give a clue.

Things to be Improved

  • Log SQL in every test to sharp analysis
  • Testing other module
  • Record cpu, memory and io usage
  • Inject a profiler to find out the part that took the most consume time in one test cycle

Conclusion

The test in this article is just a rough clue if you care about performance instead of feature improvement. Logging SQL and record the hardware usage can confirm and gives an insight to boost the performance. Over the time, Odoo always improve the feature. Sometimes it cannot install in the previous version. For example, v.14 focus on user interface improvement and v.15 comes with profiler by default.

--

--