-
-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][IMP] Query performance for shop route in website_sale_filter_p… #858
[14.0][IMP] Query performance for shop route in website_sale_filter_p… #858
Conversation
c0ab4dd
to
55c6f79
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
3411fc4
to
55c6f79
Compare
…roduct_brand Qweb key `attr_valid` stores a list of product ids, which is exposed to qContext - Before this commit: Product ids list for `attr_valid` is built with ORM `mapped()`, which is very slow if you have a lot of products and attributes for products. (Tested with 15'000 products and around 500 values for different attributes) Depending on hardware, this might cause some annoying delay before the "/shop" route is loaded, as this single query might take several seconds to be executed in such situations. - After this commit: Product ids list for `attr_valid` is now built with a search domain on `product.attribute.value` model: this will improve loading time by a lot (about x35 times faster) for "/shop" route compared to ORM `mapped()` execution time.
55c6f79
to
55657a2
Compare
@chienandalu Thanks for the approval ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR has the |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at bad0d8b. Thanks a lot for contributing to OCA. ❤️ |
…roduct_brand
Fixes #792 in v14.0
Additional context
Time difference between queries in our environments before and after commit
It's quite a big boost, I hope I am not missing something.