diff options
| author | ryv-odoo <ryv@odoo.com> | 2019-10-10 13:24:27 +0000 |
|---|---|---|
| committer | ryv-odoo <ryv@odoo.com> | 2019-10-10 15:19:43 +0000 |
| commit | e0ba61d9fb6f15c9df5d9cec4b5a6b602dc45899 (patch) | |
| tree | 2f7b4a59b80aab53de5f41b043daa5e58a3f324a /addons/website_links/static | |
| parent | 8c2f6b006fd7e92653706652d5d5eb279887b0fd (diff) | |
[REM] website_links: remove favicon, icon_src for performance
The link tracker model (link.tracker) contained favicon (store)
and icon_src computed fields. Computing favicon took
{3-6.5%} of installing odoo (with demo data) due to syncronous http
call to a external link (google).
Moreover, these fields had no sense to be store in odoo
and only used in one template. This template was modified to
display the same information (icon) as before but without storing fields
and with a lazy loading of icons.
TASK_ID: 2083715
closes odoo/odoo#38405
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_links/static')
| -rw-r--r-- | addons/website_links/static/img/default_favicon.png | bin | 0 -> 492 bytes | |||
| -rw-r--r-- | addons/website_links/static/src/xml/recent_link.xml | 3 |
2 files changed, 1 insertions, 2 deletions
diff --git a/addons/website_links/static/img/default_favicon.png b/addons/website_links/static/img/default_favicon.png Binary files differnew file mode 100644 index 00000000000..1878008c34a --- /dev/null +++ b/addons/website_links/static/img/default_favicon.png diff --git a/addons/website_links/static/src/xml/recent_link.xml b/addons/website_links/static/src/xml/recent_link.xml index 22008b81203..dc41b9003fe 100644 --- a/addons/website_links/static/src/xml/recent_link.xml +++ b/addons/website_links/static/src/xml/recent_link.xml @@ -8,9 +8,8 @@ <p class="text-muted" style="margin-top: -5px;">clicks</p> </div> <div class="col-md-7 col-7"> - <h4 class="truncate_text"> - <img t-att-src="widget.link_obj.icon_src" alt="Icon"/> + <img t-attf-src="http://www.google.com/s2/favicons?domain={{ widget.link_obj.url }}" loading="lazy" alt="Icon" onerror="this.src='/website_links/static/img/default_favicon.png'"/> <a class="no-link-style" t-att-href="widget.link_obj.url"><t t-esc="widget.link_obj.title"/></a> </h4> <p class="text-muted mb0" style="margin-top: -5px;"> |
