summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorLucas Lefèvre <lul@odoo.com>2019-03-07 15:40:52 +0100
committerYannick Tivisse <yti@odoo.com>2019-03-19 09:35:31 +0100
commit74246d288f7269729c524d226b55569690bbfe18 (patch)
tree3039ed8fbaab53be74c206b6719c1934280d2b42 /addons/web/static/src/js/views/basic/basic_controller.js
parent29633756b08bf6380fd2ee49718b1403cd36e9e5 (diff)
[IMP] hr_payroll: Improve benefits conflict performance
This commit changes the way benefits overlaps are detected. Currently, all benefits are read from db and the overlap detection is done in Python. After this commit, use a single sql query to only retreive overlapping benefits. The query takes advantage of the postgresql range type `tsrange` and the intersection operator Performance improvements: Tests with 500 employees and benefits generated for 15 months (~300000 records in the table) Conflict detection over 1 month (~20000 records) => ~5X speedup (from more than 2s to less than 0.5s)
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions