Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Perhaps an Odoo Performance Issue ?!
by
        
            sewisoft UG  , Stefan Wild
        
        
        
    
        
        
    Dear all OCAler,
    
I have noticed a performance behavior with Odoo, and want to clarify if I am wrong, or not :)
    
In my opinion, Odoo clears too often the complete LRU Cache. So all ir.qweb, ir.model.access, and so on, has to be reloaded.
In that case, you find the Log message: "At least one model cache has been invalidated, signaling through the database."
    
Here just two examples when this happens:
    
- Deleting a record which has got an IrModelData Entry e.g. through exporting
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/models.py#L3695
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/addons/base/models/ir_model.py#L1968
    
- Changing a user-defined default value
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/addons/base/models/ir_default.py#L32
    
    
In our scenario( ~1.000.000 Sale Orders, ~350 Modules installed), this results, that an F5 Browser Refresh need's ~5 seconds.
Without clearing the LRU Cache, the reload is done in < 1 second.
    
My question:
Is this really necessary to invalid all ir.qweb, ir.model.access data, when I just change one default value of a user, or delete one IrModelData entry ?
    
Is there a way to change this behavior ?
    
Thank you all and Best regards,
Stefan
    
    
    
    
      
      
  
I have noticed a performance behavior with Odoo, and want to clarify if I am wrong, or not :)
In my opinion, Odoo clears too often the complete LRU Cache. So all ir.qweb, ir.model.access, and so on, has to be reloaded.
In that case, you find the Log message: "At least one model cache has been invalidated, signaling through the database."
Here just two examples when this happens:
- Deleting a record which has got an IrModelData Entry e.g. through exporting
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/models.py#L3695
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/addons/base/models/ir_model.py#L1968
- Changing a user-defined default value
https://github.com/odoo/odoo/blob/c9609c62efe163901f8c2b1a30355b60dd34ad51/odoo/addons/base/models/ir_default.py#L32
In our scenario( ~1.000.000 Sale Orders, ~350 Modules installed), this results, that an F5 Browser Refresh need's ~5 seconds.
Without clearing the LRU Cache, the reload is done in < 1 second.
My question:
Is this really necessary to invalid all ir.qweb, ir.model.access data, when I just change one default value of a user, or delete one IrModelData entry ?
Is there a way to change this behavior ?
Thank you all and Best regards,
Stefan
        Vielen Dank und viele Grüße
        
          
        
        
          
        
        
      
     Stefan Wild
Geschäftsführer
        Geschäftsführer
 sewisoft GmbH
            Örtleinsweg 39
            96148 Baunach
            
            info@sewisoft.de
            Tel. +49 (0) 160 / 99 11 25 69
            www.sewisoft.de
          
 Sitz der Gesellschaft:
            Baunach
            Registergericht: Amtsgericht Bamberg, HRB 8508
            Geschäftsführer: Günter Selbert, Stefan Wild 
Follow-Ups
- 
                Re: Perhaps an Odoo Performance Issue ?!byTecnativa. S. L., Pedro M. Baeza- 06/10/2022 15:13:43 - 0
- 
                Re: Perhaps an Odoo Performance Issue ?!by "Holger Brunn" <mail@hunki-enterprises.nl> - 05/10/2022 14:58:00 - 1
-