[IMP] website_sale: speed up loading of attributes on shop
[IMP] website_sale: speed up loading of attributes on shop

For 10000 templates, of which around 1000 have variants, with 100 existing
attributes and 20 values for each:

- Displaying the /shop page takes 0.55s before the commit and 0.49s after.
That's a 60ms again, around 10% faster.
- The number of queries goes from 113 to 106.
- The specific line that is changed goes from 6.3% total request time down to
2.77%, so the line becomes 2.3 times faster.

closes odoo/odoo#34213

Signed-off-by: Sébastien Theys (seb) <62d754cc350e84d3b1c32ae79f976f5348e74a40@odoo.com>
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo