Daily updates from Odoo
Thursday, April 25, 2024
1 change
Enhancements to existing features
The aged payable accounting report has been optimized to load significantly faster. Previously, the system was processing unnecessary data that was filtered out later, causing timeouts on large databases. The fix streamlines the data retrieval process, reducing load times from over 15 minutes to just seconds for large companies.
Original PR description
# Issue: The query for constructing the aged_payable accounting report takes too long to load. # Analysis: When a database has lots of companies, it's likely to have a huge number of rows in the…
# Issue: The query for constructing the aged_payable accounting report takes too long to load. # Analysis: When a database has lots of companies, it's likely to have a huge number of rows in the account_partial_reconcile table. Currently, the entire account_partial_reconcile table is being iterated in the report generation, only to be filtered out later on in the query. This superfluous computation is extremely inefficient and it could be easily avoided by correctly using LATERAL JOIN syntax to make use of the filters applied later on.  # Fix: Use the correct condition inside the lateral join to filter on account_move_lines that are already filtered later on. # Benchmark: ### Report loading time | # account partial reconcile lines | # account move lines | Company size | Before | After | | --- | ------ | ------ | ------| ----- | | 588503 | 2339215 | Large | 15m+ (timeout) | ~14.02s | | 5761 | 27635 | Medium | 15m+ (timeout) | ~3s | | 11 | 1513 | Small | 7.69 | ~1.6s | #### Total number of account partial reconcile: 3279438 #### Total number of account move lines: 10688953 # Related ticket: opw-3819017 Forward-Port-Of: odoo/enterprise#61036