From ffdac7dccaf646e92f66f8937f9eec7940c4c504 Mon Sep 17 00:00:00 2001 From: Jan Verbeek Date: Thu, 29 Oct 2020 18:55:01 +0100 Subject: [PATCH] [FIX] web_advanced_filter: Cache-related performance issue --- web_advanced_filter/models/ir_filters.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web_advanced_filter/models/ir_filters.py b/web_advanced_filter/models/ir_filters.py index 53920bb82..35f97746b 100644 --- a/web_advanced_filter/models/ir_filters.py +++ b/web_advanced_filter/models/ir_filters.py @@ -66,8 +66,12 @@ class IrFilters(models.Model): @api.multi @api.depends( - 'domain_this', 'union_filter_ids.domain', - 'complement_filter_ids.domain', + # Morally, this should have union_filter_ids.domain and + # complement_filter_ids.domain. But that causes the domain to be + # invalidated much too often, sometimes giving an enormous slowdown. + # This comment was added in version 12. It should be reinvestigated + # when migrating to a higher version. + 'domain_this', 'union_filter_ids', 'complement_filter_ids', ) def _compute_domain(self): '''combine our domain with all domains to union/complement,