a23468c845
For these function fields, bypassing the ORM, using a SQL query, improves the execution time by 100 for a set of 80 timesheets in a database with - 250K `hr.analytic.timesheet` & - 250K `hr.attendance`. These function fields depends on a one2many field which use the SQL view `hr_timesheet_sheet_sheet_day`. When performing `sheet.period_ids`, two SQL requests are performed, - the first just to know the ids in the sql view matching this sheet - the second to read the fields `total_attendance` & `total_timesheet` and the request is performed on the entire set of lines of this view (~250K lines in the observed use case) while, when replaced by this SQL request, only one request is performed, on a restricted set of lines, speeding up significantly the computation of these computed fields for smaller sets of sheets. opw-653447 |
||
---|---|---|
.. | ||
i18n | ||
process | ||
report | ||
security | ||
static/src | ||
test | ||
wizard | ||
__init__.py | ||
__openerp__.py | ||
board_hr_timesheet_view.xml | ||
hr_timesheet_sheet.py | ||
hr_timesheet_sheet_data.xml | ||
hr_timesheet_sheet_demo.xml | ||
hr_timesheet_sheet_view.xml | ||
hr_timesheet_workflow.xml | ||
res_config.py | ||
res_config_view.xml |