Scalability problems with one2many_list widgets
Bug #508370 reported by
elver
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo GTK Client (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have a huge number of books in my database and each references a language object. In the language object form I have a one2many_list widget displaying all the books in that language.
The problem is that this list is huge (thousands of books) and whenever I view a language record, it takes several seconds to load. This is a giant scalability issue. We've only got about 9000 books in the test database. Eventually we're hoping to have several million.
There does not seem to be any way to set a limit on how many books to display at any one time in a one2many_list widget.
To post a comment you must log in.
Have you tried using the Koo client (Qt/KDE OpenObject client: https:/ /launchpad. net/openobject- client- kde)? It is able to do dynamic paging, loading records as you scroll down, instead of loading them all at once.
Also take a look at the Postgres/SQL side: are your queries ("books on this language") using indexes? I think you should make sure that you have at least an index on the language field of your books.
You may enable Postgres logging to see which queries is doing OpenERP (and you can use pgFouine to analyze that log file for the most frequent queries, the slowest ones... http:// pgfouine. projects. postgresql. org/). www.postgresql. org/docs/ 8.1/static/ sql-explain. html). And then, if you discover a complex query that requires indexes, you may extend the autoinit of your book object to create the indexes you need ("cr.execute( 'CREATE INDEX...") when the object is load (search for "CREATE INDEX" on the addons to find some examples)
Then use the explain feature of Postgres to know if those queries are using indexes "EXPLAIN SELECT..." (http://