Performance issues adding/removing records
There's a difference between tryton and sao clients when records are added or removed. We've found this in a couple of scenarious although I believe both are part of the same implementation problem:
In one of them we have a one2many field (lines) which has on_change_lines implemented. The lines field is filled with 10 records by another 'template' field's on_change call.
On the GTK client, there are two RPC requests:
- on_change_template
- on_change_lines: called because of the data filled-in by on_change_template
On Sao, however, there are many more RPC requests. The 'on_change_template' one and one "on_change_lines" call for each of the records added to the lines by 'on_change_template'.
The othe scenario we've found happens when removing several records at once on a list view (not on a one2many). The GTK client makes a single RPC request for the delete operation of all records and so does Sao. As records are removed, the client makes an RPC request for getting resources counts (attachments and notes). The GTK client makes a single request, and, Sao makes as many requests as records have been removed.