Skip to content
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

[16.0][IMP] connector_search_engine: No prefetch for binding data #179

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connector_search_engine/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Connector Search Engine
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:547f25e8d231f8513e14b6f643af79a98fccb3853b533b41d4ef36c229d3b7f6
!! source digest: sha256:d3f9f139fa17b9a02bf4d6648949fa2e1cb38128197922065b0dee912080c288
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion connector_search_engine/models/se_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SeBinding(models.Model):
)
date_recomputed = fields.Datetime(readonly=True)
date_synchronized = fields.Datetime(readonly=True)
data = fields.Json(readonly=True)
data = fields.Json(readonly=True, prefetch=False)
data_display = fields.Text(
compute="_compute_data_display",
help="Include this in debug mode to be able to inspect index data.",
Expand Down
5 changes: 5 additions & 0 deletions connector_search_engine/readme/newsfragments/179.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Lower memory consumption by disabling prefetch for the field 'data' on the binding model.

The field 'data' is a json field that is not used in the view or common management
operations of the binding model. This json field can be very large. By disabling
the prefetch, we avoid to overload the database and Odoo with useless data.
3 changes: 2 additions & 1 deletion connector_search_engine/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Connector Search Engine</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:547f25e8d231f8513e14b6f643af79a98fccb3853b533b41d4ef36c229d3b7f6
!! source digest: sha256:d3f9f139fa17b9a02bf4d6648949fa2e1cb38128197922065b0dee912080c288
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/search-engine/tree/16.0/connector_search_engine"><img alt="OCA/search-engine" src="https://img.shields.io/badge/github-OCA%2Fsearch--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/search-engine-16-0/search-engine-16-0-connector_search_engine"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/search-engine&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Base module for connecting Odoo with external search engines. This addon is
Expand Down
Loading