Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0045305 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Retail Modules] Web POS | major | always | 2020-10-27 06:35 | 2020-11-18 09:11 | |||
Reporter | marvintm | View Status | public | |||||
Assigned To | aferraz | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR20Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | RR20Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | marvintm | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0045305: Performance of the tax engine can be improved | |||||||
Description | Currently, the ticket calculation performance degrades quite significantly with the number of lines. Almost all the degradation comes from the tax engine, and particularly the call to the OB.Taxes.filterRulesByTicketLine function, which computes which tax rules could be applied to a line. If this was optimised, the performance of the engine, and the ticket calculation speed in general, would improve by a very large amount. | |||||||
Steps To Reproduce | Create a big ticket using "GPS" products (to ensure that all lines have a discount). Realise that after 200 lines, calculating a ticket takes around 1.5 seconds. Do some profiling. Realise that almost all the time is spent in the OB.Taxes.filterRulesByTicketLine function. | |||||||
Proposed Solution | The initial optimisation we are going to try consists in trying to avoid calculating the rules if the line already has them, and the line itself didn't change. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0124471) hgbot (developer) 2020-11-18 09:08 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: 74a22caf12ba75d9f45233229b0c27adca4b3905 Author: Álvaro Ferraz <alvaro.ferraz@openbravo.com> Date: 2020-11-18T09:07:38+01:00 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/74a22caf12ba75d9f45233229b0c27adca4b3905 [^] Fixes ISSUE-45305: Performance of the tax engine can be improved Move maps, filters and sorts not using line information from filterRulesByTicketLine to filterRulesByTicket: - joinRuleAndZone - sortByRegionFrom - sortByCountryFrom - sortByLineno - sortByCascade - sortByTaxBase Move some filters to filterRulesByTicket to reduce the rules sent to filterRulesByTicketLine: - checkTaxCategory, - checkCountry - checkRegion Reorder some filters to apply first the ones more restrictive. --- M web/org.openbravo.retail.posterminal/app/model/business-logic/taxes-engine/engine/tax-engine.js --- |
Issue History | |||
Date Modified | Username | Field | Change |
2020-10-27 09:36 | marvintm | Type | defect => backport |
2020-10-27 09:36 | marvintm | Target Version | => RR20Q4 |
2020-11-18 09:06 | aferraz | Assigned To | Retail => aferraz |
2020-11-18 09:08 | hgbot | Resolution | open => fixed |
2020-11-18 09:08 | hgbot | Status | scheduled => resolved |
2020-11-18 09:08 | hgbot | Fixed in Version | => RR20Q4 |
2020-11-18 09:08 | hgbot | Note Added: 0124471 | |
2020-11-18 09:11 | marvintm | Review Assigned To | => marvintm |
2020-11-18 09:11 | marvintm | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |