hr_timesheet_sheet: Timesheets big performance issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Addons Team 3 |
Bug Description
Hello,
We are experiencing major problems of performance on timesheets.
OpenERP 6.0.2
Performance issues occur with the module hr_timesheet_sheet.
We have ~ lines per tables :
- hr_timesheet_sheet : 7'500
- hr_analytic_
- hr_attendance : 110'000
Opening the "Timesheets" menu takes a few minutes for the 80 first rows.
Then open the timesheet form view takes nearly 30 seconds.
Each action on a timesheet (Sign-in/out, fill a timesheet line, ..) takes nearly 30 seconds again.
It's clear that the main cause of the problem is : hr_timesheet.
This view computes the indicators for the whole tables and only afterwards we get the rows that we need.
The second cause of the problem is the fields sheet_id in hr.attendance and hr.analytic.
The function fields total_attendanc
Here is the actions that I found to bring an acceptable situation:
- Removed the "By Day" page on the timesheet view, instead I added a link which open a new view (this will still be slow but it can be acceptable as a first solution as you decide to open it...).
- I replaced the methods to compute the hr_timesheet_
- There is still a bottleneck, on a search of sheet_id in hr.attendance and hr.analytic.
This improves a lot the performances, but there is still a lot of room to improve them !
Maybe we have to replace this function fields / one2many_mod with one2many fields ?
Here is the link to my branch (I propose a merge.)
https:/
Thanks
Guewen
Related branches
- OpenERP Core Team: Pending requested
- Diff: 0 lines
- Raphael Collet (OpenERP) (community): Approve
- Bharat Devnani (Open ERP) (community): Needs Resubmitting
-
Diff: 635 lines (+258/-205)3 files modifiedhr_timesheet_sheet/hr_timesheet_sheet.py (+207/-198)
hr_timesheet_sheet/hr_timesheet_sheet_view.xml (+39/-4)
hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml (+12/-3)
description: | updated |
Changed in openobject-addons: | |
status: | New → Triaged |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Changed in openobject-addons: | |
status: | Fix Released → Fix Committed |
Did you check for indices /bugs.launchpad .net/bugs/ 771941
https:/