diff options
| author | Yannick Tivisse <yti@odoo.com> | 2020-05-19 09:18:00 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-08-25 13:22:24 +0000 |
| commit | 8c96a887d3f05680c923dcd44f9c70c0e5e0bd32 (patch) | |
| tree | ce00e88fb50d8642bcf550661db07d53210d3f59 /addons/mail_bot/static/src/components/notification_request/notification_request.scss | |
| parent | 369375a69adc20a92075a89ef9557bf6b46cd605 (diff) | |
[FW][MERGE] resource,calendar,hr_holidays: Improve the performances
TL;DR
=====
Improve performances with nearly a factor of 2. Use case, call action_validate on hr.leave for 100 employees
- 1987 requests -> 844 requests
- 1300 ms -> 700 ms
Purpose
=======
The first purpose of this commit is to add a test ensuring the number of request while creating
a company leave for 100 employees, if 15 of them already have a leave during that period.
It includes, the mass leave generation, and the conflicts resolutions. (Cancelling/Splitting the
already existing one and adapting the dates accordingly).
The second one is to reduce the number of request for this test.
In term of requests, currently we have:
- 5154 requests without bypassing the mail tracking + the activities management
- 1987 requests when bypassing the mail post-process (this is the current value, the bypassing was
already done several month ago)
- 844 requests with all the optimization done in resource/calendar/hr_holidays
In terms of execution time, we have a reduction from +- 1300 ms to call the method action_validate
to +- 700 ms
As the performances issues severity increases with the number of leaves to create and the real time access
to the database, on the production base, we reduced the execution time to generate more than 500 hr.leaves
from several minutes to 21 seconds. A fix to avoid deadlock was already made at
https://github.com/odoo/enterprise/pull/10740/files
Some contortions were made to avoid changing a signature method in a stable release and thus
introducing for each method a second one, with the "batched" implementation, to keep a retro-compatibility
for the existing custom code.
But surely this could be cleaned in the master version. The old one will be deprecated while waiting to be
removed in a few versions.
closes odoo/odoo#56477
Taskid: 2256705
X-original-commit: 8820db912f9e8ca71a57d3b0d32d2020d35b963f
Related: odoo/enterprise#12642
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/mail_bot/static/src/components/notification_request/notification_request.scss')
0 files changed, 0 insertions, 0 deletions
