Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Add indexes in stock queries and speed up bin updation #27758

Merged
merged 9 commits into from
Oct 12, 2021

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented Oct 3, 2021

  • Force item and warehouse indexing for stock queries
  • Convert update_stock from method to a function to reduce the get_doc call for bin

@codecov
Copy link

codecov bot commented Oct 3, 2021

Codecov Report

Merging #27758 (3563d8e) into develop (6019f60) will decrease coverage by 0.07%.
The diff coverage is 94.59%.

@@             Coverage Diff             @@
##           develop   #27758      +/-   ##
===========================================
- Coverage    54.55%   54.48%   -0.08%     
===========================================
  Files         1248     1254       +6     
  Lines        67518    67727     +209     
===========================================
+ Hits         36836    36899      +63     
- Misses       30682    30828     +146     
Impacted Files Coverage Δ
erpnext/controllers/stock_controller.py 90.69% <ø> (ø)
...k/doctype/stock_ledger_entry/stock_ledger_entry.py 85.21% <0.00%> (-0.75%) ⬇️
erpnext/stock/doctype/bin/bin.py 92.45% <95.65%> (+0.45%) ⬆️
erpnext/stock/stock_ledger.py 86.98% <100.00%> (+1.39%) ⬆️
erpnext/stock/utils.py 64.28% <100.00%> (+1.24%) ⬆️
erpnext/education/doctype/student/student.py 73.95% <0.00%> (-3.13%) ⬇️
...ion/doctype/course_enrollment/course_enrollment.py 45.09% <0.00%> (-1.97%) ⬇️
erpnext/portal/utils.py 30.00% <0.00%> (-1.43%) ⬇️
erpnext/hooks.py 0.00% <0.00%> (ø)
erpnext/regional/saudi_arabia/setup.py 0.00% <0.00%> (ø)
... and 23 more

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Oct 11, 2021

Command backport version-13-hotfix: pending

backport version-13-hotfix is pending

erpnext/stock/utils.py Outdated Show resolved Hide resolved
@ankush ankush changed the title fix: Add indexes in stock queries perf: Add indexes in stock queries Oct 11, 2021
ankush and others added 2 commits October 11, 2021 12:42
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
ankush
ankush previously approved these changes Oct 11, 2021
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
@ankush ankush changed the title perf: Add indexes in stock queries perf: Add indexes in stock queries and speed up bin updation Oct 12, 2021
@ankush ankush merged commit 6f107da into frappe:develop Oct 12, 2021
mergify bot pushed a commit that referenced this pull request Oct 12, 2021
perf: Add indexes in stock queries and speed up bin updation
(cherry picked from commit 6f107da)
@mergify
Copy link
Contributor

mergify bot commented Oct 12, 2021

Command backport version-13-hotfix: success

Backports have been created

deepeshgarg007 added a commit that referenced this pull request Oct 13, 2021
…-27758

perf: Add indexes in stock queries and speed up bin updation (backport #27758)
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
…7758

perf: Add indexes in stock queries and speed up bin updation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants