Skip to content

[Issue] Checkout / Sales Rules / Get rid of redundant DB query #29453

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #29376: Checkout / Sales Rules / Get rid of redundant DB query


Preconditions:

  • Loading data in the loop?
  • No, thank you!

By replacing direct SQL query with Data Provider that was already used in this Validator class allowed me to drastically reduce the cost of checkout placing process.

Local environment

20 products in cart

image

Custom project

22 products in cart

image

Related Pull Requests

Fixed Issues (if relevant)

Performance of Checkout

Steps to reproduce:

  1. Install sample data
  2. Create Catalog rule based on category
  3. Add plenty of products (15 - inf.)
  4. Place an order.

Actual Result:
2020-08-07_14-13

Expected Result:

Checkout should work faster by 20 - 30%

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: RuleComponent: SalesRuleFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions