0
CMS performances optimization
Fabien Meghazi
Performance
Refers to the capability of a system to provide a
certain response time.
Performance
What has been done in odoo in terms of performance
optimization ?
Performance
1. A new type of view (QWeb)
2. Asset bundlesAsset bundles
Performance
Here's what we can find in the document > body > head of
most CMS's default setup.
<head><head>
<link<link href...
Performance
Why is it a problem?
BrowserBrowser Max. concurrent connections per domainMax. concurrent connections per doma...
Performance
Solved by asset bundles!
<head><head>
<link<link href="/web/css/website.assets_frontend" rel="stylesheet"/>/>
...
Performance
Asset bundles are Odoo views too (ir.ui.view) !
<template<template id="my_theme" inherit_id="website.assets_fr...
Performance
1. A new type of view (QWeb)
2. Asset bundles
3. E-tags for imagesE-tags for images
Scalability
Ability of a system to handle a growing amount of
work in a capable manner.
Scalability
What does Odoo provides in terms of scalability?
1. ORM prefetchORM prefetch
# res.partner
companies == self.....
Scalability
An ORM lacking prefetch can't provide an efficient SQL
query plan:
-- 1 query - N results
SELECTSELECT ...... FR...
Scalability
1. ORM prefetch
2. Preforked workers (same as Gunicorn)Preforked workers (same as Gunicorn)
Results
Want detailed results, benchmarks and comparison of
performance?
Please attend to the "Open Source CMS: a performa...
Questions ?
Thanks for listening !
Upcoming SlideShare
Loading in...5
×

Odoo - CMS performances optimization

2,078

Published on

What has been done in odoo in terms of performance
optimization ?

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
  • Hi All, If you are looking for Technical Blogs or want to read about vTiger, Odoo, OpenERP, Microsoft Apps, Google Apps, CRM, ERPs, Mobile Apps and New things in IT industry then read and subscribe on http://www.knowledgement.ie OR go to http://www.targetintegration.com/ for CRM and ERP purchase consultation. We also design mobile apps and mobile responsive web sites of businesses and E-Commerce
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
2,078
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
121
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "Odoo - CMS performances optimization"

  1. 1. CMS performances optimization Fabien Meghazi
  2. 2. Performance Refers to the capability of a system to provide a certain response time.
  3. 3. Performance What has been done in odoo in terms of performance optimization ?
  4. 4. Performance 1. A new type of view (QWeb) 2. Asset bundlesAsset bundles
  5. 5. Performance Here's what we can find in the document > body > head of most CMS's default setup. <head><head> <link<link href="/files/css/css_pbm0lsQQJ7A7WCCIMgxLho6mI_kBNgznNUWmTWcnfoE.css" type="text/css" rel="stylesheet" <link<link href="/files/css/css_GgerrJ1eO2p2FAGV0vkRGdFa8QLXDr0-mUgvpPQTbXU.css" type="text/css" rel="stylesheet" <link<link href="/files/css/css_GLOpzAhXMtWYvS4h5wbl6MtSyjZs8gh4uS0H2yCFKMQ.css" type="text/css" rel="stylesheet" <link<link href="/files/css/css_FA2n7wdGXAxEt6RZrMKCEcj3lLJtYSo_M5fkYjNGzYY.css" type="text/css" rel="stylesheet" <link<link href="/files/css/css_BxX7fMKqodl8G9DZ2zEO8tz0u1pex3OS77VssQ6kAbs.css" type="text/css" rel="stylesheet" <script<script src="/files/js/js_xAPl0qIk9eowy_iS9tNkCWXLUVoat94SQT48UBCFkyQ.js" type="text/javascript"></script>></script> <script<script src="/files/js/js_pWaEh3PAhCcBT2MOtrKzosTxS9eM5SUYFirhq9KQa0M.js" type="text/javascript"></script>></script> <script<script src="/files/js/js_sqDzf_5suPJcQpKY1lVF0I5wO_5bUrj5RwpiTKV3w3o.js" type="text/javascript"></script>></script> <script<script src="/files/js/js_TA8qfKqSlPTRUeVEmNo6g-LK6_BQOwPCT-lpp_13vP8.js" type="text/javascript"></script>></script> <script<script src="/files/js/js_rv_BKYv7yieH0IgHddhWHDC-bWGan8yiJbusyOpr0mw.js" type="text/javascript"></script>></script> <script<script src="/files/js/js_fZbsGtwY7jnTvjaAvTzUEFJKO-FkHlZC6o1x2O_56wc.js" type="text/javascript"></script>></script> ...
  6. 6. Performance Why is it a problem? BrowserBrowser Max. concurrent connections per domainMax. concurrent connections per domain Firefox 3+ 6 Opera 12+ 6 Safari 5+ 6 IE 8 6 IE 10 8 Chrome 6 Lack of @aync or @defer makes javascript loading synchronous.
  7. 7. Performance Solved by asset bundles! <head><head> <link<link href="/web/css/website.assets_frontend" rel="stylesheet"/>/> <script<script src="/web/js/website.assets_frontend"></script>></script> An asset bundle automatically concatenates and minifies javascripts and stylesheets in order to reduce the page load latency. Of course, once a bundle is generated, it's cached. <script<script src="/web/js/website.assets_frontend/da39a3e"></script>></script> Versioned bundles (still to be merged in master for v8)
  8. 8. Performance Asset bundles are Odoo views too (ir.ui.view) ! <template<template id="my_theme" inherit_id="website.assets_frontend">> <xpath<xpath expr="." position="inside">> <script<script src="/my_theme/static/src/js/my_theme.js"></script>></script> <link<link href="/my_theme/static/src/css/my_theme.css" rel="stylesheet"/>/> </xpath></xpath> </template></template> As such, they benefit of all the advantages we just talked about in the previous topics.
  9. 9. Performance 1. A new type of view (QWeb) 2. Asset bundles 3. E-tags for imagesE-tags for images
  10. 10. Scalability Ability of a system to handle a growing amount of work in a capable manner.
  11. 11. Scalability What does Odoo provides in terms of scalability? 1. ORM prefetchORM prefetch # res.partner companies == self..search([(([('is_company',,'=',,True)]))]) forfor company inin companies:: forfor contact inin company..child_ids:: ifif contact..country_id:: printprint u"%s : %s" %% ((contact..name,, contact..country_id..name))
  12. 12. Scalability An ORM lacking prefetch can't provide an efficient SQL query plan: -- 1 query - N results SELECTSELECT ...... FROMFROM res_partner -- N queries - M results SELECTSELECT ...... FROMFROM res_partner WHEREWHERE parent_id == <<id>> -- N*M queries SELECTSELECT ...... FROMFROM res_country WHEREWHERE id == <<id>> On 200 companies with ~2 linked partners each would cause those nested loops to make 601 SQL queries. In Odoo, the chains of browse record lists allows the ORM to efficiently plan the same operations in 5 SQL queries
  13. 13. Scalability 1. ORM prefetch 2. Preforked workers (same as Gunicorn)Preforked workers (same as Gunicorn)
  14. 14. Results Want detailed results, benchmarks and comparison of performance? Please attend to the "Open Source CMS: a performance comparison" talk by Mantavya Gajjar in this room at 16:20.
  15. 15. Questions ?
  16. 16. Thanks for listening !
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×